2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +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:
Robert Manner
2020-01-28 14:24:58 +01:00
committed by Todd C. Miller
parent 9d69c4a022
commit f268e851d7

View File

@@ -183,7 +183,6 @@ python_sudo_options_as_dict(PyObject *py_self, PyObject *py_args)
}
cleanup:
Py_CLEAR(py_config_tuple);
Py_CLEAR(py_config_tuple_iterator);
Py_CLEAR(py_config);
Py_CLEAR(py_splitted);