diff --git a/build/policies.c b/build/policies.c index 5d704c0eb5..d0e9b949ae 100644 --- a/build/policies.c +++ b/build/policies.c @@ -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; @@ -298,6 +299,9 @@ static rpmRC processPolicies(rpmSpec spec, Package pkg, int test) free(name); free(types); + if (optCon) + poptFreeContext(optCon); + return rc; } #endif