From c9932a3a92dd7b8696e4e145c7d7e2c080b46ffb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 3 Dec 2004 05:27:43 +0000 Subject: r4051: use talloc_array() instead of talloc() when allocating arrays in auto-generated ndr code (This used to be commit 90cdfd921e1a6f8806fe94bba61f1bbaa79c79f1) --- source4/librpc/ndr/libndr.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source4/librpc/ndr/libndr.h b/source4/librpc/ndr/libndr.h index 8a160c5deb..1cec8d4c2a 100644 --- a/source4/librpc/ndr/libndr.h +++ b/source4/librpc/ndr/libndr.h @@ -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", \ -- cgit