git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7e9c97b
)
lib:tdb: Fix a memory leak on error
author
Andreas Schneider
<asn@samba.org>
Wed, 7 Jul 2021 09:12:37 +0000
(11:12 +0200)
committer
Stefan Metzmacher
<metze@samba.org>
Thu, 8 Jul 2021 09:30:40 +0000
(09:30 +0000)
Found by covscan.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/tdb/common/transaction.c
patch
|
blob
|
history
diff --git
a/lib/tdb/common/transaction.c
b/lib/tdb/common/transaction.c
index 4f8d1f8cdccc5d4723a4c7d7e76c8c54a31a7256..5ab38d0809f29264ea7e69afaa68423705bb8c63 100644
(file)
--- a/
lib/tdb/common/transaction.c
+++ b/
lib/tdb/common/transaction.c
@@
-1301,6
+1301,7
@@
int tdb_transaction_recover(struct tdb_context *tdb)
rec.data_len, 0) == -1) {
TDB_LOG((tdb, TDB_DEBUG_FATAL, "tdb_transaction_recover: failed to read recovery data\n"));
tdb->ecode = TDB_ERR_IO;
+ free(data);
return -1;
}