diff --git a/libselinux/src/audit2why.c b/libselinux/src/audit2why.c index 0c814aab..86574e46 100644 --- a/libselinux/src/audit2why.c +++ b/libselinux/src/audit2why.c @@ -299,6 +299,10 @@ static int __policy_init(const char *init_path) static PyObject *init(PyObject *self __attribute__((unused)), PyObject *args) { int result; char *init_path=NULL; + if (avc) { + PyErr_SetString( PyExc_RuntimeError, "init called multiple times"); + return NULL; + } if (!PyArg_ParseTuple(args,(char *)"|s:policy_init",&init_path)) return NULL; result = __policy_init(init_path);