From: Volker Lendecke Date: Mon, 30 Sep 2024 09:01:04 +0000 (+0200) Subject: ntvfs: Fix CID 1034883 Resource leak X-Git-Tag: tdb-1.4.13~1018 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd8d0cba3fafc4900177fcfee3a5b6f95c845293;p=thirdparty%2Fsamba.git ntvfs: Fix CID 1034883 Resource leak Signed-off-by: Volker Lendecke Reviewed-by: Andreas Schneider --- diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index 000da41f066..794f06d3e06 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -414,7 +414,10 @@ do_open: } status = ntvfs_handle_new(ntvfs, req, &handle); - NT_STATUS_NOT_OK_RETURN(status); + if (!NT_STATUS_IS_OK(status)) { + close(fd); + return status; + } f = talloc(handle, struct svfs_file); if (f == NULL) {