diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libmux/io.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libmux/io.c b/src/libmux/io.c index d9d9d8a6..3a2a9331 100644 --- a/src/libmux/io.c +++ b/src/libmux/io.c @@ -34,8 +34,11 @@ _muxrecvproc(void *v) qunlock(&mux->inlk); qlock(&mux->lk); _muxqhangup(q); - while(_muxnbqrecv(q, &p)) + p = nil; + while(_muxnbqrecv(q, &p) && p != nil){ free(p); + p = nil; + } free(q); mux->readq = nil; rwakeup(&mux->rpcfork); |