From 42f2d96f82a8156abb004c68d343c8b769ebea4b Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Thu, 11 Apr 2024 16:15:39 +1200 Subject: [PATCH] ldb-samba:ldif_handlers: ldif_read_objectSid(): free a thing on failure Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- lib/ldb-samba/ldif_handlers.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ldb-samba/ldif_handlers.c b/lib/ldb-samba/ldif_handlers.c index 8873ee6e4e6..f3187731bc6 100644 --- a/lib/ldb-samba/ldif_handlers.c +++ b/lib/ldb-samba/ldif_handlers.c @@ -110,6 +110,7 @@ static int ldif_read_objectSid(struct ldb_context *ldb, void *mem_ctx, ndr_err = ndr_push_struct_into_fixed_blob(out, &sid, (ndr_push_flags_fn_t)ndr_push_dom_sid); if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) { + TALLOC_FREE(out->data); return -1; } }