svn commit: samba r16310 - in trunk/source/smbd: .

jra at samba.org jra at samba.org
Fri Jun 16 22:36:15 GMT 2006


Author: jra
Date: 2006-06-16 22:36:14 +0000 (Fri, 16 Jun 2006)
New Revision: 16310

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16310

Log:
Fix Klocwork #1596. Check for NULL on talloc.
Jeremy.

Modified:
   trunk/source/smbd/trans2.c


Changeset:
Modified: trunk/source/smbd/trans2.c
===================================================================
--- trunk/source/smbd/trans2.c	2006-06-16 22:36:12 UTC (rev 16309)
+++ trunk/source/smbd/trans2.c	2006-06-16 22:36:14 UTC (rev 16310)
@@ -172,6 +172,11 @@
 
 	for (i = 0, ea_namelist = TALLOC(mem_ctx, ea_namelist_size); i < 6;
 			ea_namelist = TALLOC_REALLOC_ARRAY(mem_ctx, ea_namelist, char, ea_namelist_size), i++) {
+
+		if (!ea_namelist) {
+			return NULL;
+		}
+
 		if (fsp && fsp->fh->fd != -1) {
 			sizeret = SMB_VFS_FLISTXATTR(fsp, fsp->fh->fd, ea_namelist, ea_namelist_size);
 		} else {



More information about the samba-cvs mailing list