[asterisk-commits] rmudgett: branch 13 r423895 - in /branches/13: ./ res/res_pjsip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 25 16:01:31 CDT 2014


Author: rmudgett
Date: Thu Sep 25 16:01:28 2014
New Revision: 423895

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423895
Log:
res_pjsip.c: Add missing off nominal cleanup in ast_sip_push_task_synchronous().

* Made memset the std struct in ast_sip_push_task_synchronous() because if
DEBUG_THREADS is enabled then uninitialized lock tracking data is used.
........

Merged revisions 423894 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    branches/13/   (props changed)
    branches/13/res/res_pjsip.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip.c?view=diff&rev=423895&r1=423894&r2=423895
==============================================================================
--- branches/13/res/res_pjsip.c (original)
+++ branches/13/res/res_pjsip.c Thu Sep 25 16:01:28 2014
@@ -2786,18 +2786,22 @@
 		return sip_task(task_data);
 	}
 
+	memset(&std, 0, sizeof(std));
 	ast_mutex_init(&std.lock);
 	ast_cond_init(&std.cond, NULL);
-	std.fail = std.complete = 0;
 	std.task = sip_task;
 	std.task_data = task_data;
 
 	if (serializer) {
 		if (ast_taskprocessor_push(serializer, sync_task, &std)) {
+			ast_mutex_destroy(&std.lock);
+			ast_cond_destroy(&std.cond);
 			return -1;
 		}
 	} else {
 		if (ast_threadpool_push(sip_threadpool, sync_task, &std)) {
+			ast_mutex_destroy(&std.lock);
+			ast_cond_destroy(&std.cond);
 			return -1;
 		}
 	}




More information about the asterisk-commits mailing list