]> git.proxmox.com Git - mirror_frr.git/commitdiff
nhrpd: use CALLOC instead of MALLOC
authorPhilippe Guibert <philippe.guibert@6wind.com>
Tue, 16 Jul 2019 13:04:33 +0000 (15:04 +0200)
committerPhilippe Guibert <philippe.guibert@6wind.com>
Fri, 9 Apr 2021 16:29:58 +0000 (18:29 +0200)
in order to apply a memset to a non initialised structure, use CALLOC
instead of MALLOC

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
nhrpd/zbuf.c

index a23526af484ebaad4031404f660e36ffe0d93482..43ce974817986c52656bdff848e943264f98a6e6 100644 (file)
@@ -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;