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:
parent
0e651b4508
commit
4d9753dfbd
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user