Author: glebius
Date: Fri Jan 16 18:51:26 2015
New Revision: 277258
URL: https://svnweb.freebsd.org/changeset/base/277258

Log:
  Plug mutex leak.
  
  MFC after:    1 week
  Sponsored by: Nginx, Inc.

Modified:
  head/usr.sbin/ngctl/main.c

Modified: head/usr.sbin/ngctl/main.c
==============================================================================
--- head/usr.sbin/ngctl/main.c  Fri Jan 16 18:47:20 2015        (r277257)
+++ head/usr.sbin/ngctl/main.c  Fri Jan 16 18:51:26 2015        (r277258)
@@ -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);
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to