From b1e5e3ad783c995c5fb226bd48dc9cda2d9f98ee Mon Sep 17 00:00:00 2001 From: sears Date: Wed, 1 Sep 2010 17:40:52 +0000 Subject: [PATCH] fix minor memory leak git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@1089 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe --- requestDispatch.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/requestDispatch.cpp b/requestDispatch.cpp index 5885a48..db0da9b 100644 --- a/requestDispatch.cpp +++ b/requestDispatch.cpp @@ -23,17 +23,18 @@ inline int requestDispatch::op_bulk_insert(logtable *ltable, while((tups[cur_tup_count] = readtuplefromsocket(fd, &err))) { cur_tup_count++; if(cur_tup_count == tups_size) { - ltable->insertManyTuples(tups, cur_tup_count); +// ltable->insertManyTuples(tups, cur_tup_count); for(int i = 0; i < cur_tup_count; i++) { datatuple::freetuple(tups[i]); } cur_tup_count = 0; } } - ltable->insertManyTuples(tups, cur_tup_count); +// ltable->insertManyTuples(tups, cur_tup_count); for(int i = 0; i < cur_tup_count; i++) { datatuple::freetuple(tups[i]); } + free(tups); if(!err) err = writeoptosocket(fd, LOGSTORE_RESPONSE_SUCCESS); return err; }