From: Jeremy Allison Date: Fri, 18 Mar 2022 19:00:15 +0000 (-0700) Subject: s3: smbd: open_internal_dirfsp() add missing file_free() in error path. X-Git-Tag: tevent-0.12.0~273 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec2fb9d22842332992b8f667a8218f7aaa1be7c4;p=thirdparty%2Fsamba.git s3: smbd: open_internal_dirfsp() add missing file_free() in error path. BUG: https://bugzilla.samba.org/show_bug.cgi?id=15022 Signed-off-by: Jeremy Allison Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/files.c b/source3/smbd/files.c index 5c0525441ca..6062a41902f 100644 --- a/source3/smbd/files.c +++ b/source3/smbd/files.c @@ -266,6 +266,7 @@ NTSTATUS open_internal_dirfsp(connection_struct *conn, ret = SMB_VFS_FSTAT(fsp, &fsp->fsp_name->st); if (ret != 0) { + file_free(NULL, fsp); return map_nt_error_from_unix(errno); }