1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-26 10:04:02 +03:00

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>
This commit is contained in:
Gary Lockyer 2019-12-18 11:17:51 +13:00 committed by Andrew Bartlett
parent 0e651b4508
commit 4d9753dfbd

View File

@ -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);
}