From: Volker Lendecke Date: Mon, 20 Jan 2025 14:52:06 +0000 (+0100) Subject: vfs: Do an early talloc_free in an error path X-Git-Tag: tdb-1.4.13~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8455d7a05e601b044c4a352654dbd1dfc10cb058;p=thirdparty%2Fsamba.git vfs: Do an early talloc_free in an error path Not a long-term memleak, talloc_tos() takes care of this later, but this looks cleaner to me. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/modules/vfs_default.c b/source3/modules/vfs_default.c index c726298ac6f..5d16cbb5bf3 100644 --- a/source3/modules/vfs_default.c +++ b/source3/modules/vfs_default.c @@ -1406,6 +1406,7 @@ static NTSTATUS vfswrap_parent_pathname(struct vfs_handle_struct *handle, smb_fname_in->twrp, smb_fname_in->flags); if (name == NULL) { + TALLOC_FREE(parent); return NT_STATUS_NO_MEMORY; }