]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
pdb_ldap: Fix memory leak CID#1363095
authorVinit Agnihotri <vagnihot@redhat.com>
Mon, 18 Aug 2025 07:32:04 +0000 (13:02 +0530)
committerAnoop C S <anoopcs@samba.org>
Mon, 18 Aug 2025 12:03:30 +0000 (12:03 +0000)
Signed-off-by: Vinit Agnihotri <vagnihot@redhat.com>
Reviewed-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Autobuild-User(master): Anoop C S <anoopcs@samba.org>
Autobuild-Date(master): Mon Aug 18 12:03:30 UTC 2025 on atb-devel-224

source3/passdb/pdb_ldap.c

index 1e3779fc6cfb251880b297ecc6de16b40898de4d..14b3dfc249352e3c3cca54871fe1df3fa97a4066 100644 (file)
@@ -2195,6 +2195,7 @@ static NTSTATUS ldapsam_add_sam_account(struct pdb_methods *my_methods, struct s
        filter = talloc_strdup(attr_list, "(uid=%u)");
        if (!filter) {
                status = NT_STATUS_NO_MEMORY;
+               TALLOC_FREE(escape_user);
                goto fn_exit;
        }
        filter = talloc_all_string_sub(attr_list, filter, "%u", escape_user);