]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libndr: Fix two small error path memleaks
authorVolker Lendecke <vl@samba.org>
Wed, 24 Dec 2025 09:56:17 +0000 (10:56 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2026 09:57:41 +0000 (09:57 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
librpc/rpc/binding.c

index f7b47db57e5683b050796a11aa39e0b142ffd213..750dfa21898b121be60169da367d1f367f91db6e 100644 (file)
@@ -967,10 +967,12 @@ static DATA_BLOB dcerpc_floor_pack_lhs_data(TALLOC_CTX *mem_ctx, const struct nd
 
        ndr_err = ndr_push_GUID(ndr, NDR_SCALARS | NDR_BUFFERS, &syntax->uuid);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+               TALLOC_FREE(ndr);
                return data_blob_null;
        }
        ndr_err = ndr_push_uint16(ndr, NDR_SCALARS, syntax->if_version);
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
+               TALLOC_FREE(ndr);
                return data_blob_null;
        }