]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
net: Fix a panic in "net vfs getntacl"
authorVolker Lendecke <vl@samba.org>
Thu, 20 Mar 2025 16:57:11 +0000 (17:57 +0100)
committerVolker Lendecke <vl@samba.org>
Thu, 27 Mar 2025 13:13:31 +0000 (13:13 +0000)
We have to explicitly free smb_fname, because after openat_pathref_fsp
we have a file descriptor around. If we then later talloc_free() the
connection_struct, fd_handle_destructor() panics because talloc_free()
does not free smb_fname before the connection_struct.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Anoop C S <anoopcs@samba.org>
source3/utils/net_vfs.c

index b468cf11b801993d61cf079a663b4a3a462e08db..4cfa6f9e8d9ee10621b07b15b576939d3c643efd 100644 (file)
@@ -308,6 +308,7 @@ done:
                        rc = 1;
                }
        }
+       TALLOC_FREE(smb_fname);
        return rc;
 }