Commit 18445468 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

assert NULL realloc. addresses #1328

git-svn-id: file:///svn/toku/tokudb.1032b@8340 c7de825b-a66e-492c-adef-691d508d4ae1
parent 169833a9
...@@ -91,7 +91,7 @@ void memarena_close(MEMARENA *map) { ...@@ -91,7 +91,7 @@ void memarena_close(MEMARENA *map) {
} }
void memarena_move_buffers(MEMARENA dest, MEMARENA source) { void memarena_move_buffers(MEMARENA dest, MEMARENA source) {
REALLOC_N(dest->n_other_bufs + source->n_other_bufs + 1, dest->other_bufs); REALLOC_N(dest->n_other_bufs + source->n_other_bufs + 1, dest->other_bufs); assert(dest->other_bufs);
int i; int i;
for (i=0; i<source->n_other_bufs; i++) { for (i=0; i<source->n_other_bufs; i++) {
dest->other_bufs[dest->n_other_bufs++] = source->other_bufs[i]; dest->other_bufs[dest->n_other_bufs++] = source->other_bufs[i];
......
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