Commit d32dcf96 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul Committed by Yoni Fogel

Fix #3345. Use {{{XMALLOC}}} in {{{compress.c}}}. close[t:3345]

git-svn-id: file:///svn/toku/tokudb@29138 c7de825b-a66e-492c-adef-691d508d4ae1
parent fecfef2e
......@@ -44,7 +44,7 @@ void toku_compress (enum toku_compression_method a,
assert(1 <= *destLen);
*destLen = 1;
} else {
qlz_state_compress *MALLOC(qsc);
qlz_state_compress *XMALLOC(qsc);
size_t actual_destlen = qlz_compress(source, (char*)(dest+1), sourceLen, qsc);
assert(actual_destlen +1 <= *destLen);
*destLen = actual_destlen+1; // add one for the rfc1950-style header byte.
......@@ -73,7 +73,7 @@ void toku_decompress (Bytef *dest, uLongf destLen,
}
case TOKU_QUICKLZ_METHOD:
if (sourceLen>1) {
qlz_state_decompress *MALLOC(qsd);
qlz_state_decompress *XMALLOC(qsd);
uLongf actual_destlen = qlz_decompress((char*)source+1, dest, qsd);
assert(actual_destlen == destLen);
toku_free(qsd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment