Fix potential memory leak in cpu enumeration on Linux (#2008)
authorMartin Kroeker <martin@ruby.chemie.uni-freiburg.de>
Sun, 10 Feb 2019 22:24:45 +0000 (23:24 +0100)
committerGitHub <noreply@github.com>
Sun, 10 Feb 2019 22:24:45 +0000 (23:24 +0100)
commit03a2bf2602714360fdf7096a4fc362ecfc700823
tree363627a82455063ae186672a0f23711f22e2fb18
parent69edc5bbe79af88710666aa909e7b39c89558b9c
Fix potential memory leak in cpu enumeration on Linux (#2008)

* Fix potential memory leak in cpu enumeration with glibc

An early return after a failed call to sched_getaffinity would leak the previously allocated cpu_set_t. Wrong calculation of the size argument in that call increased the likelyhood of that failure. Fixes #2003
driver/others/memory.c