Commit 0d861f0f authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Remove memory leak in txn->commit

git-svn-id: file:///svn/tokudb@599 c7de825b-a66e-492c-adef-691d508d4ae1
parent db9d08dd
......@@ -9,7 +9,7 @@ ifeq ($(CYGWIN),cygwin)
else
FPICFLAGS = -fPIC
# valgrind is not present on cygwin
DTOOL = valgrind --quiet --error-exitcode=1
DTOOL = valgrind --quiet --error-exitcode=1 --leak-check=yes
endif
CFLAGS = -Wall -W $(OPTFLAGS) -g $(GCOV_FLAGS) $(PROF_FLAGS) -Werror $(FPICFLAGS) -Wshadow
......
......@@ -209,8 +209,11 @@ int tokulogger_log_commit (TOKUTXN txn) {
wbuf_txnid(&wbuf, txn->txnid64);
int r = tokulogger_finish(txn->logger, &wbuf);
if (r!=0) return r;
if (txn->parent) return 0;
else return tokulogger_fsync(txn->logger);
int result;
if (txn->parent) result=0;
else result=tokulogger_fsync(txn->logger);
toku_free(txn);
return result;
}
int tokulogger_log_checkpoint (TOKULOGGER logger, LSN *lsn) {
......
......@@ -9,7 +9,7 @@ LOADLIBES = -L../ -ldb
else
LIBEXT=so
LOADLIBES = -L../ -ldb -Wl,-rpath,..
TEST=valgrind --quiet --error-exitcode=1
TEST=valgrind --quiet --error-exitcode=1 --leak-check=yes
endif
LIBNAME=libdb.$(LIBEXT)
......
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