[svn-commits] rmudgett: trunk r423896 - in /trunk: ./ res/res_pjsip.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 25 16:03:54 CDT 2014


Author: rmudgett
Date: Thu Sep 25 16:03:51 2014
New Revision: 423896

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=423896
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
........

Merged revisions 423895 from http://svn.asterisk.org/svn/asterisk/branches/13

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip.c

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

Modified: trunk/res/res_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip.c?view=diff&rev=423896&r1=423895&r2=423896
==============================================================================
--- trunk/res/res_pjsip.c (original)
+++ trunk/res/res_pjsip.c Thu Sep 25 16:03:51 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 svn-commits mailing list