Fix error when policy does not match the system.

This commit is contained in:
Dan Walsh 2013-10-11 10:05:50 -04:00 committed by Stephen Smalley
parent d0b1e420e7
commit 43c9e8c7e2
1 changed files with 1 additions and 2 deletions

View File

@ -66,7 +66,6 @@ PyObject *wrap_policy(PyObject *UNUSED(self), PyObject *args){
}
apol_vector_destroy(&mod_paths);
policy_load_options |= QPOL_POLICY_OPTION_MATCH_SYSTEM;
policy = apol_policy_create_from_policy_path(pol_path, policy_load_options, NULL, NULL);
apol_policy_path_destroy(&pol_path);
if (!policy) {
@ -87,7 +86,7 @@ static PyMethodDef methods[] = {
{NULL, NULL, 0, NULL} /* sentinel */
};
void init_policy() {
void init_policy(void) {
PyObject *m;
m = Py_InitModule("_policy", methods);
init_info(m);