mirror of
https://github.com/sudo-project/sudo.git
synced 2025-09-03 07:45:47 +00:00
plugins/sudo_python_module: Fix double free in sudo.options_as_dict function
PyArg_ParseTuple sets the py_config_tuple pointer, but it does not increment the reference count, so by decrementing, we end up freeing the argument passed in.
This commit is contained in:
committed by
Todd C. Miller
parent
9d69c4a022
commit
f268e851d7
@@ -183,7 +183,6 @@ python_sudo_options_as_dict(PyObject *py_self, PyObject *py_args)
|
|||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
Py_CLEAR(py_config_tuple);
|
|
||||||
Py_CLEAR(py_config_tuple_iterator);
|
Py_CLEAR(py_config_tuple_iterator);
|
||||||
Py_CLEAR(py_config);
|
Py_CLEAR(py_config);
|
||||||
Py_CLEAR(py_splitted);
|
Py_CLEAR(py_splitted);
|
||||||
|
Reference in New Issue
Block a user