diff options
Diffstat (limited to 'source4/ntvfs')
-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); |