diff options
author | glebius <glebius@FreeBSD.org> | 2015-01-23 17:49:16 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2015-01-23 17:49:16 +0000 |
commit | 90eda5374c3773c27aa7dcdc1213937a3671b8bb (patch) | |
tree | 0dd398beb09a4c2beee493457463b1991066e9f8 /usr.sbin/ngctl | |
parent | 9a50f3f3a82de6da98cf2e358dba486c478449d2 (diff) | |
download | FreeBSD-src-90eda5374c3773c27aa7dcdc1213937a3671b8bb.zip FreeBSD-src-90eda5374c3773c27aa7dcdc1213937a3671b8bb.tar.gz |
Merge r277258: plug mutex leak in ngctl(8).
Diffstat (limited to 'usr.sbin/ngctl')
-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); } |