From c07c1486efed5ea636ed49d358194197ef2a9c68 Mon Sep 17 00:00:00 2001 From: sears Date: Thu, 25 Feb 2010 20:17:04 +0000 Subject: [PATCH] fix remaining regressed unit test; check_datapage.cpp was leaking a datapage, then running off the end of its buffer. git-svn-id: svn+ssh://svn.corp.yahoo.com/yahoo/yrl/labs/pnuts/code/logstore@631 8dad8b1f-cf64-0410-95b6-bcf113ffbcfe --- test/check_datapage.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/check_datapage.cpp b/test/check_datapage.cpp index 4c66e41..5ebf90c 100644 --- a/test/check_datapage.cpp +++ b/test/check_datapage.cpp @@ -73,7 +73,7 @@ void insertProbeIter(size_t NUM_ENTRIES) dpages++; if(dp) delete dp; - + dp = new DataPage(xid, pcount, alloc); bool succ = dp->append(newtuple); @@ -81,8 +81,9 @@ void insertProbeIter(size_t NUM_ENTRIES) dsp.push_back(dp->get_start_pid()); } - - + } + if(dp) { + delete dp; } printf("Total data set length: %lld\n", (long long)datasize);