Skip to content

Commit

Permalink
psutil/_psutil_posix.c: better clear variables to ensure they are NULL (
Browse files Browse the repository at this point in the history
  • Loading branch information
ret2libc authored and giampaolo committed Nov 18, 2019
1 parent 7d512c8 commit 3a9bccf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions psutil/_psutil_posix.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,11 @@ psutil_net_if_addrs(PyObject* self, PyObject* args) {
goto error;
if (PyList_Append(py_retlist, py_tuple))
goto error;
Py_DECREF(py_tuple);
Py_DECREF(py_address);
Py_DECREF(py_netmask);
Py_DECREF(py_broadcast);
Py_DECREF(py_ptp);
Py_CLEAR(py_tuple);
Py_CLEAR(py_address);
Py_CLEAR(py_netmask);
Py_CLEAR(py_broadcast);
Py_CLEAR(py_ptp);
}

freeifaddrs(ifaddr);
Expand Down

0 comments on commit 3a9bccf

Please sign in to comment.