mirror of
https://github.com/FRRouting/frr.git
synced 2025-04-30 13:37:17 +02:00
Merge pull request #17795 from gromit1811/bugfix_priv_syscaps_alloc
lib: Fix privs syscaps (pset_t) allocation
This commit is contained in:
commit
3d7dbcf6c6
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue