From 0b1f3aea27280de0436f465346264c2623ba2d3e Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 19 Apr 2012 11:36:11 +0200 Subject: s3: Fix Coverity ID 2682: NULL_RETURNS --- source3/modules/vfs_scannedonly.c | 4 ++++ 1 file changed, 4 insertions(+) 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'; -- cgit