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