diff options
author | Volker Lendecke <vl@samba.org> | 2013-10-20 17:11:16 +0200 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-10-21 16:34:19 -0700 |
commit | ee78af33fe5c9d84de35bbb0687b6d185abc8cf6 (patch) | |
tree | a465e49d1da78bb040ec1d4b800531f7db5e3533 /source4/ntvfs | |
parent | d286b17d46984e85418ed4778890948df979a9f6 (diff) | |
download | samba-ee78af33fe5c9d84de35bbb0687b6d185abc8cf6.tar.gz samba-ee78af33fe5c9d84de35bbb0687b6d185abc8cf6.tar.bz2 samba-ee78af33fe5c9d84de35bbb0687b6d185abc8cf6.zip |
ntvfs: Fix Coverity ID 1107224 Resource leak
In this error path we were leaking "fd".
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/posix/pvfs_open.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source4/ntvfs/posix/pvfs_open.c b/source4/ntvfs/posix/pvfs_open.c index a095f74633..ceee64255f 100644 --- a/source4/ntvfs/posix/pvfs_open.c +++ b/source4/ntvfs/posix/pvfs_open.c @@ -717,7 +717,9 @@ static NTSTATUS pvfs_create_file(struct pvfs_state *pvfs, if (io->generic.in.query_maximal_access) { status = pvfs_access_maximal_allowed(pvfs, req, name, &io->generic.out.maximal_access); - NT_STATUS_NOT_OK_RETURN(status); + if (!NT_STATUS_IS_OK(status)) { + goto cleanup_delete; + } } /* form the lock context used for byte range locking and |