Author: mimir Date: 2006-08-07 20:43:06 +0000 (Mon, 07 Aug 2006) New Revision: 17450
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=17450 Log: A bit more protection against memory allocation errors. rafal Modified: branches/SAMBA_4_0/source/libnet/libnet_user.h Changeset: Modified: branches/SAMBA_4_0/source/libnet/libnet_user.h =================================================================== --- branches/SAMBA_4_0/source/libnet/libnet_user.h 2006-08-07 20:30:58 UTC (rev 17449) +++ branches/SAMBA_4_0/source/libnet/libnet_user.h 2006-08-07 20:43:06 UTC (rev 17450) @@ -82,7 +82,8 @@ if (new.field != 0) { \ NTTIME newval = timeval_to_nttime(new.field); \ if (newval != current->field) { \ - mod->field = talloc_memdup(mem_ctx, new.field, sizeof(*new.field)); \ + mod->field = talloc_memdup(mem_ctx, new.field, sizeof(*new.field)); \ + if (mod->field == NULL) return NT_STATUS_NO_MEMORY; \ mod->fields |= flag; \ } \ }