diff options
author | Gary Lockyer <gary@catalyst.net.nz> | 2019-12-18 11:17:51 +1300 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2019-12-18 06:39:26 +0000 |
commit | 4d9753dfbd8a2d66d86f60aabee627826247aa38 (patch) | |
tree | 362ddbbd2628ba6758b7f615280059d4ab218639 /lib | |
parent | 0e651b4508d44e4343c83e1c157d919150aee489 (diff) | |
download | samba-4d9753dfbd8a2d66d86f60aabee627826247aa38.tar.gz |
lib ldb: fix use after free
Fix ASAN detected use after free. No security implications as the
talloc_free is followed immediately by the print statement and the value
printed is an integer
Signed-off-by: Gary Lockyer <gary@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ldb/common/ldb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ldb/common/ldb.c b/lib/ldb/common/ldb.c index 95e9138a56b..8c86dca45a1 100644 --- a/lib/ldb/common/ldb.c +++ b/lib/ldb/common/ldb.c @@ -1392,8 +1392,8 @@ int ldb_op_default_callback(struct ldb_request *req, struct ldb_reply *ares) } if (ares->type != LDB_REPLY_DONE) { - talloc_free(ares); ldb_asprintf_errstring(req->handle->ldb, "Invalid LDB reply type %d", ares->type); + TALLOC_FREE(ares); return ldb_request_done(req, LDB_ERR_OPERATIONS_ERROR); } |