Plug mutex leak.

MFC after:	1 week
Sponsored by:	Nginx, Inc.
This commit is contained in:
Gleb Smirnoff 2015-01-16 18:51:26 +00:00
parent c884d31122
commit 61b6fd5ab2

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