posixcompat: fix incorrect destruction of pthread_cond
authorZaheer Chothia <zchothia@inf.ethz.ch>
Mon, 20 Apr 2015 20:24:36 +0000 (22:24 +0200)
committerZaheer Chothia <zchothia@inf.ethz.ch>
Mon, 20 Apr 2015 21:08:44 +0000 (23:08 +0200)
commitecedc6b6c451c10e71c25f126be9400b8fd12eb1
treea577d3da6de7f3b1aa04e7a881e411d3666b9bed
parentd035e12f1c1e94ce20837acad5786e23121b71c8
posixcompat: fix incorrect destruction of pthread_cond

The object being freed was the wrapper, which belongs to the caller and
may even have static lifetime (.data section), whereas now it correctly
relases the inner block of memory which was allocated in
`pthread_cont_init`.

(The unrelated change in mmap add a missing comma when debug is enabled.)

Signed-off-by: Zaheer Chothia <zchothia@inf.ethz.ch>
lib/posixcompat/mmap.c
lib/posixcompat/pthreads.c