From: Volker Lendecke Date: Thu, 19 Apr 2012 09:36:11 +0000 (+0200) Subject: s3: Fix Coverity ID 2682: NULL_RETURNS X-Git-Tag: samba-4.0.0alpha20~179 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0b1f3aea27280de0436f465346264c2623ba2d3e;p=thirdparty%2Fsamba.git s3: Fix Coverity ID 2682: NULL_RETURNS --- diff --git a/source3/modules/vfs_scannedonly.c b/source3/modules/vfs_scannedonly.c index baf7fbefa90..b43c6df9727 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';