Commit 9faf3006 authored by Dave Wells's avatar Dave Wells Committed by Yoni Fogel

plug memory leak [t:2426]

git-svn-id: file:///svn/toku/tokudb@18330 c7de825b-a66e-492c-adef-691d508d4ae1
parent 8dbeb009
...@@ -463,11 +463,11 @@ static int lc_fix_bad_logfile(TOKULOGCURSOR lc) { ...@@ -463,11 +463,11 @@ static int lc_fix_bad_logfile(TOKULOGCURSOR lc) {
off_t last_good_pos; off_t last_good_pos;
last_good_pos = ftello(lc->cur_fp); last_good_pos = ftello(lc->cur_fp);
while (1) { while (1) {
if ( lc->entry_valid ) { // initialize le
toku_log_free_log_entry_resources(&le); // - reading incomplete entries can result in fields that cannot be freed
lc->entry_valid = FALSE; memset(&le, 0, sizeof(le));
}
r = toku_log_fread(lc->cur_fp, &le); r = toku_log_fread(lc->cur_fp, &le);
toku_log_free_log_entry_resources(&le);
if ( r!=0 ) break; if ( r!=0 ) break;
last_good_pos = ftello(lc->cur_fp); last_good_pos = ftello(lc->cur_fp);
} }
......
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