diff options
-rw-r--r-- | source3/modules/vfs_scannedonly.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c index baf7fbefa9..b43c6df972 100644 --- a/source3/modules/vfs_scannedonly.c +++ b/source3/modules/vfs_scannedonly.c @@ -945,6 +945,10 @@ static int scannedonly_connect(struct vfs_handle_struct *handle, struct Tscannedonly *so; so = SMB_MALLOC_P(struct Tscannedonly); + if (so == NULL) { + errno = ENOMEM; + return -1; + } handle->data = (void *)so; handle->free_data = free_scannedonly_data; so->gsendbuffer[0]='\0'; |