Merge r277258: plug mutex leak in ngctl(8).

This commit is contained in:
glebius 2015-01-23 17:49:16 +00:00
parent 9a50f3f3a8
commit 90eda5374c

View File

@ -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);
}