From e8263bdb776638c3837da2f34fa52a5a9f951b35 Mon Sep 17 00:00:00 2001 From: Philippe Guibert Date: Tue, 16 Jul 2019 15:04:33 +0200 Subject: [PATCH] nhrpd: use CALLOC instead of MALLOC in order to apply a memset to a non initialised structure, use CALLOC instead of MALLOC Signed-off-by: Philippe Guibert --- nhrpd/zbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nhrpd/zbuf.c b/nhrpd/zbuf.c index a23526af48..43ce974817 100644 --- a/nhrpd/zbuf.c +++ b/nhrpd/zbuf.c @@ -27,7 +27,7 @@ struct zbuf *zbuf_alloc(size_t size) { struct zbuf *zb; - zb = XMALLOC(MTYPE_ZBUF_DATA, sizeof(*zb) + size); + zb = XCALLOC(MTYPE_ZBUF_DATA, sizeof(*zb) + size); zbuf_init(zb, zb + 1, size, 0); zb->allocated = 1;