diff --git a/lib/privs.c b/lib/privs.c index 717a2e48d629..b0809bf690a3 100644 --- a/lib/privs.c +++ b/lib/privs.c @@ -179,7 +179,7 @@ static pset_t *zcaps2sys(zebra_capabilities_t *zcaps, int num) for (i = 0; i < num; i++) count += cap_map[zcaps[i]].num; - if ((syscaps = XCALLOC(MTYPE_PRIVS, (sizeof(pset_t) * num))) == NULL) { + if ((syscaps = XCALLOC(MTYPE_PRIVS, sizeof(pset_t))) == NULL) { fprintf(stderr, "%s: could not allocate syscaps!", __func__); return NULL; }