]> granicus.if.org Git - procps-ng/commit
proc/readproc.c: Fix double-free()s in readtask().
authorQualys Security Advisory <qsa@qualys.com>
Thu, 1 Jan 1970 00:00:00 +0000 (00:00 +0000)
committerCraig Small <csmall@enc.com.au>
Fri, 18 May 2018 21:32:22 +0000 (07:32 +1000)
commita013f6e02002347ea223533aa4b94c86722bf436
tree340f81acb301e8071cdf9d48710b7d947d6c4431
parent1539c135071694ba6074b29a68ba08eeb3d59dfb
proc/readproc.c: Fix double-free()s in readtask().

If QUICK_THREADS is not defined (it is not by default, but most
distributions enable it) and task_dir_missing is true (only on very old
kernels), then readtask() forgets to reset some of the struct proc_t t's
members, which later results in double-free()s in free_acquired().

For now, we simply synchronized the list of members to be reset with the
list of members freed in free_acquired().
proc/readproc.c