mirror of
https://github.com/MariaDB/server.git
synced 2025-01-22 14:54:20 +01:00
Remove memory leak. Fixes #1027.
git-svn-id: file:///svn/tokudb@5194 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
parent
10bdafb7fc
commit
acdf833c6c
2 changed files with 5 additions and 3 deletions
4
Makefile
4
Makefile
|
@ -1,8 +1,8 @@
|
|||
default: build
|
||||
|
||||
|
||||
TAGS: */*.c */*.h
|
||||
etags */*.c */*.h src/lock_tree/*.c src/lock_tree/*.h src/range_tree/*.c src/range_tree/*.h newbrt/tests/*.h
|
||||
TAGS: */*.c */*.h */*/*.c */*/*.h
|
||||
etags */*.c */*.h src/tests/*.c src/tests/*.h src/lock_tree/*.c src/lock_tree/*.h src/range_tree/*.c src/range_tree/*.h newbrt/tests/*.h
|
||||
|
||||
SRCDIRS = newbrt src cxx utils db-benchmark-test db-benchmark-test-cxx
|
||||
BUILDDIRS = $(SRCDIRS) man/texi
|
||||
|
|
|
@ -423,7 +423,7 @@ int toku_logger_commit (TOKUTXN txn, int nosync) {
|
|||
int len = strlen(txn->rollentry_filename);
|
||||
// Don't have to strdup the rollentry_filename because
|
||||
// we take ownership of it.
|
||||
BYTESTRING fname = {len, txn->rollentry_filename};
|
||||
BYTESTRING fname = {len, toku_strdup_in_rollback(txn, txn->rollentry_filename)};
|
||||
r = toku_logger_save_rollback_rollinclude(txn->parent, fname);
|
||||
if (r!=0) { cleanup_txn(txn); return r; }
|
||||
r = close(txn->rollentry_fd);
|
||||
|
@ -432,11 +432,13 @@ int toku_logger_commit (TOKUTXN txn, int nosync) {
|
|||
// set txn->rollentry_filename=0 so that the cleanup
|
||||
// won't try to close the fd again.
|
||||
unlink(txn->rollentry_filename);
|
||||
toku_free(txn->rollentry_filename);
|
||||
txn->rollentry_filename = 0;
|
||||
cleanup_txn(txn);
|
||||
return r;
|
||||
}
|
||||
// Stop the cleanup from closing and unlinking the file.
|
||||
toku_free(txn->rollentry_filename);
|
||||
txn->rollentry_filename = 0;
|
||||
}
|
||||
// Append the list to the front of the parent.
|
||||
|
|
Loading…
Add table
Reference in a new issue