diff options
author | Volker Lendecke <vl@samba.org> | 2013-11-10 19:41:15 +0100 |
---|---|---|
committer | Ira Cooper <ira@samba.org> | 2013-11-11 21:04:09 +0100 |
commit | b7420e44b1f7e0e0f54cf9f329981bacf839f7c9 (patch) | |
tree | 68595819184ab83e9f05ed290cfef8507e72d04c /source4 | |
parent | 144428058a73b059d7389915e310ff48fd591e59 (diff) | |
download | samba-b7420e44b1f7e0e0f54cf9f329981bacf839f7c9.tar.gz |
ntvfs: Fix CID 1034883 Resource leak
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ira Cooper <ira@samba.org>
Diffstat (limited to 'source4')
-rw-r--r-- | source4/ntvfs/simple/vfs_simple.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c index 58c8df8dd53..a652494dc17 100644 --- a/source4/ntvfs/simple/vfs_simple.c +++ b/source4/ntvfs/simple/vfs_simple.c @@ -414,7 +414,10 @@ do_open: NT_STATUS_NOT_OK_RETURN(status); f = talloc(handle, struct svfs_file); - NT_STATUS_HAVE_NO_MEMORY(f); + if (f == NULL) { + close(fd); + return NT_STATUS_NO_MEMORY; + } f->fd = fd; f->name = talloc_strdup(f, unix_path); NT_STATUS_HAVE_NO_MEMORY(f->name); |