diff options
author | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-13 17:48:27 +0200 |
---|---|---|
committer | Giampaolo Rodola <g.rodola@gmail.com> | 2017-05-13 17:48:27 +0200 |
commit | 137e7edf60918196e9338789f27a31fd5920a956 (patch) | |
tree | d7036092fbdd8db3d6e3aba6f277571cbf371c78 | |
parent | 0eeebc282dba7c3e2877c42698900da0e816d921 (diff) | |
download | psutil-137e7edf60918196e9338789f27a31fd5920a956.tar.gz |
#1064 / netbsd: swap_memory() may segfault as it does not in case of error
-rw-r--r-- | HISTORY.rst | 1 | ||||
-rw-r--r-- | psutil/arch/bsd/netbsd.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/HISTORY.rst b/HISTORY.rst index 32dba95f..cfc5aeb7 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -68,6 +68,7 @@ - 1047_: [Windows] Process username(): memory leak in case exception is thrown. - 1050_: [Windows] Process.memory_maps memory() leaks memory. - 1063_: [NetBSD] net_connections() may list incorrect sockets. +- 1064_: [NetBSD] swap_memory() may segfault in case of error. *2017-04-10* diff --git a/psutil/arch/bsd/netbsd.c b/psutil/arch/bsd/netbsd.c index 66bad193..48f7b07c 100644 --- a/psutil/arch/bsd/netbsd.c +++ b/psutil/arch/bsd/netbsd.c @@ -487,6 +487,7 @@ psutil_swap_mem(PyObject *self, PyObject *args) { error: free(swdev); + return NULL; } |