r2625: use talloc_p, not talloc when possible (when allocating a structure in particu...
authorAndrew Tridgell <tridge@samba.org>
Sat, 25 Sep 2004 11:18:50 +0000 (11:18 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:59:13 +0000 (12:59 -0500)
(This used to be commit dabc7ddd9f940db414d1c3c7bf3cebcd108fbf6f)

source4/librpc/ndr/ndr.c

index f4db614c55e7ffdcaef94ea95840b58934ab3eb2..13c74121a6ca635ccc2d365f117ae14c77ecf4a5 100644 (file)
@@ -47,7 +47,7 @@ struct ndr_pull *ndr_pull_init_blob(const DATA_BLOB *blob, TALLOC_CTX *mem_ctx)
 {
        struct ndr_pull *ndr;
 
-       ndr = talloc(mem_ctx, sizeof(*ndr));
+       ndr = talloc_p(mem_ctx, struct ndr_pull);
        if (!ndr) return NULL;
 
        ndr->flags = 0;