Skip to content

Commit

Permalink
Fix memleak when process policies
Browse files Browse the repository at this point in the history
  • Loading branch information
JetXujing committed Sep 19, 2024
1 parent ea4a98b commit d4fc6aa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions build/policies.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ static rpmRC processPolicies(rpmSpec spec, Package pkg, int test)
mod = freeModule(mod);
name = _free(name);
types = _free(types);
optCon = poptFreeContext(optCon);
}

rc = RPMRC_OK;
Expand All @@ -298,6 +299,9 @@ static rpmRC processPolicies(rpmSpec spec, Package pkg, int test)
free(name);
free(types);

if (optCon)
poptFreeContext(optCon);

return rc;
}
#endif
Expand Down

0 comments on commit d4fc6aa

Please sign in to comment.