Skip to content

Commit

Permalink
Add if (argv != NULL) check
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Gross <[email protected]>
  • Loading branch information
colesbury committed Jun 24, 2024
1 parent 5c0c089 commit 69c74c6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion psutil/arch/openbsd/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ psutil_proc_cmdline(PyObject *self, PyObject *args) {
return py_retlist;

error:
free(argv);
if (argv != NULL)
free(argv);
Py_XDECREF(py_arg);
Py_DECREF(py_retlist);
return NULL;
Expand Down

0 comments on commit 69c74c6

Please sign in to comment.