diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-09-02 15:06:46 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-09-02 15:06:46 -0400 |
commit | a731e4103b87cb02b763f2e3f73cc43c72bdf65f (patch) | |
tree | ed6b976e0e0e827cb3d08173a8a850c76eeb51fc | |
parent | fe80a8eb687f48f08e393522520f69b0c52cb297 (diff) | |
download | musl-a731e4103b87cb02b763f2e3f73cc43c72bdf65f.tar.gz musl-a731e4103b87cb02b763f2e3f73cc43c72bdf65f.tar.bz2 musl-a731e4103b87cb02b763f2e3f73cc43c72bdf65f.tar.xz musl-a731e4103b87cb02b763f2e3f73cc43c72bdf65f.zip |
fix invalid pointer in synccall (multithread setuid, etc.)
the head pointer was not being reset between calls to synccall, so any
use of this interface more than once would build the linked list
incorrectly, keeping the (now invalid) list nodes from the previous
call.
-rw-r--r-- | src/thread/synccall.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/thread/synccall.c b/src/thread/synccall.c index 706c8e73..c54570be 100644 --- a/src/thread/synccall.c +++ b/src/thread/synccall.c @@ -58,6 +58,7 @@ void __synccall(void (*func)(void *), void *ctx) sem_init(&chaindone, 0, 0); sem_init(&chainlock, 0, 1); chainlen = 0; + head = 0; callback = func; context = ctx; |