$NetBSD: patch-ac,v 1.1 2010/01/13 13:22:20 x400 Exp $

--- corelib/pbx.c.orig	2010-01-13 14:39:27.000000000 +0300
+++ corelib/pbx.c
@@ -3040,6 +3040,7 @@
     if (cw_pthread_create(&t, &attr, pbx_thread, c))
     {
         cw_log(LOG_WARNING, "Failed to create new channel thread\n");
+        decrease_call_count();
         return CW_PBX_FAILED;
     }
 
