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 authored and pmatilai committed Sep 19, 2024
1 parent 5154a58 commit 937e725
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 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 @@ -297,6 +298,7 @@ static rpmRC processPolicies(rpmSpec spec, Package pkg, int test)
freeModule(mod);
free(name);
free(types);
poptFreeContext(optCon);

return rc;
}
Expand Down

0 comments on commit 937e725

Please sign in to comment.