svn commit: samba r4051 - in branches/SAMBA_4_0/source/librpc/ndr: .

tridge at samba.org tridge at samba.org
Fri Dec 3 05:27:44 GMT 2004


Author: tridge
Date: 2004-12-03 05:27:43 +0000 (Fri, 03 Dec 2004)
New Revision: 4051

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

Log:
use talloc_array() instead of talloc() when allocating arrays in auto-generated ndr code



Modified:
   branches/SAMBA_4_0/source/librpc/ndr/libndr.h


Changeset:
Modified: branches/SAMBA_4_0/source/librpc/ndr/libndr.h
===================================================================
--- branches/SAMBA_4_0/source/librpc/ndr/libndr.h	2004-12-03 05:24:09 UTC (rev 4050)
+++ branches/SAMBA_4_0/source/librpc/ndr/libndr.h	2004-12-03 05:27:43 UTC (rev 4051)
@@ -233,7 +233,7 @@
 				if ((n) == 0) { \
 					(s) = NULL; \
 				} else { \
-					(s) = talloc(ndr, (n) * elsize); \
+					(s) = talloc_array(ndr, elsize, n, __location__); \
                                		if (!(s)) return ndr_pull_error(ndr, \
 									NDR_ERR_ALLOC, \
 									"Alloc %u * %u failed\n", \



More information about the samba-cvs mailing list