Fix some warnings from pvs-studio

This commit is contained in:
Todd C. Miller
2020-08-12 20:01:39 -06:00
parent 961a4afe67
commit a940a2c78e
5 changed files with 13 additions and 14 deletions

View File

@@ -351,6 +351,8 @@ python_sudo_conversation(PyObject *Py_UNUSED(self), PyObject *py_args, PyObject
}
replies = calloc(Py_SSIZE2SIZE(num_msgs), sizeof(struct sudo_conv_reply));
if (replies == NULL)
goto cleanup;
py_result = PyTuple_New(num_msgs);
if (py_result == NULL)
goto cleanup;