Author: jra Date: 2006-06-16 22:36:12 +0000 (Fri, 16 Jun 2006) New Revision: 16309
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16309 Log: Fix Klocwork #1596. Check for NULL on talloc. Jeremy. Modified: branches/SAMBA_3_0/source/smbd/trans2.c Changeset: Modified: branches/SAMBA_3_0/source/smbd/trans2.c =================================================================== --- branches/SAMBA_3_0/source/smbd/trans2.c 2006-06-16 22:29:56 UTC (rev 16308) +++ branches/SAMBA_3_0/source/smbd/trans2.c 2006-06-16 22:36:12 UTC (rev 16309) @@ -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 {