r4051: use talloc_array() instead of talloc() when allocating arrays in auto-generate...
authorAndrew Tridgell <tridge@samba.org>
Fri, 3 Dec 2004 05:27:43 +0000 (05:27 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:06:18 +0000 (13:06 -0500)
source/librpc/ndr/libndr.h

index 8a160c5deb07dae62a8eaeedad9d75d0eabbb7bb..1cec8d4c2aa85a0d3cd8dadc67b9230f094984ca 100644 (file)
@@ -233,7 +233,7 @@ enum ndr_err_code {
                                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", \