Commit 5c2f6b60 authored by Yoni Fogel's avatar Yoni Fogel

[t:2555] LOADER_USE_PUTS follows convention of generate_row_for_put

Prevents freeing of memory not owned by loader.

git-svn-id: file:///svn/toku/tokudb@19633 c7de825b-a66e-492c-adef-691d508d4ae1
parent f935786f
...@@ -60,11 +60,13 @@ static void free_loader_resources(DB_LOADER *loader) ...@@ -60,11 +60,13 @@ static void free_loader_resources(DB_LOADER *loader)
if ( loader->i ) { if ( loader->i ) {
for (int i=0; i<loader->i->N; i++) { for (int i=0; i<loader->i->N; i++) {
if (loader->i->ekeys && if (loader->i->ekeys &&
loader->i->ekeys[i].data) { loader->i->ekeys[i].data &&
loader->i->ekeys[i].flags == DB_DBT_REALLOC) {
toku_free(loader->i->ekeys[i].data); toku_free(loader->i->ekeys[i].data);
} }
if (loader->i->evals && if (loader->i->evals &&
loader->i->evals[i].data) { loader->i->evals[i].data &&
loader->i->evals[i].flags == DB_DBT_REALLOC) {
toku_free(loader->i->evals[i].data); toku_free(loader->i->evals[i].data);
} }
} }
......
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