diff options
author | Andreas Schneider <asn@samba.org> | 2021-07-07 11:12:37 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2021-07-08 09:30:40 +0000 |
commit | 252275f3a6b5d81d23ca0eb35bcb67c2d01dd807 (patch) | |
tree | b8e244d162cdf58a54bf66b7dfbc807d6ce072fd /lib/tdb | |
parent | 7e9c97ba1cd960df2688718561c4a117b79b259b (diff) | |
download | samba-252275f3a6b5d81d23ca0eb35bcb67c2d01dd807.tar.gz |
lib:tdb: Fix a memory leak on error
Found by covscan.
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'lib/tdb')
-rw-r--r-- | lib/tdb/common/transaction.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/tdb/common/transaction.c b/lib/tdb/common/transaction.c index 4f8d1f8cdcc..5ab38d0809f 100644 --- 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; } |