Merge pull request #17795 from gromit1811/bugfix_priv_syscaps_alloc

lib: Fix privs syscaps (pset_t) allocation
This commit is contained in:
Donald Sharp 2025-01-08 10:20:11 -05:00 committed by GitHub
commit 3d7dbcf6c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}