Skip to content

Commit

Permalink
Merge pull request #17795 from gromit1811/bugfix_priv_syscaps_alloc
Browse files Browse the repository at this point in the history
lib: Fix privs syscaps (pset_t) allocation
  • Loading branch information
donaldsharp authored Jan 8, 2025
2 parents 068a637 + 4ed9147 commit 3d7dbcf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/privs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3d7dbcf

Please sign in to comment.