diff options
author | glebius <glebius@FreeBSD.org> | 2015-01-16 18:51:26 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-01-16 18:51:26 +0000 |
commit | b077e94c55a70f65040e147b6291a623be13682c (patch) | |
tree | 96d868cfd6a6ee8a837801dfc2f55e4cebbeeac3 | |
parent | 0988dad56d7c9cb98e70d7e8a6a8a232b4cbc777 (diff) | |
download | FreeBSD-src-b077e94c55a70f65040e147b6291a623be13682c.zip FreeBSD-src-b077e94c55a70f65040e147b6291a623be13682c.tar.gz |
Plug mutex leak.
MFC after: 1 week
Sponsored by: Nginx, Inc.
-rw-r--r-- | usr.sbin/ngctl/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ngctl/main.c b/usr.sbin/ngctl/main.c index 3581386..4b1cdab 100644 --- a/usr.sbin/ngctl/main.c +++ b/usr.sbin/ngctl/main.c @@ -324,8 +324,10 @@ DoInteractive(void) history(hist, &hev, H_ENTER, buf); pthread_kill(monitor, SIGUSR1); pthread_mutex_lock(&mutex); - if (DoParseCommand(buf) == CMDRTN_QUIT) + if (DoParseCommand(buf) == CMDRTN_QUIT) { + pthread_mutex_unlock(&mutex); break; + } pthread_cond_signal(&cond); pthread_mutex_unlock(&mutex); } |