[asterisk-commits] russell: branch 1.6.0 r106302 - in /branches/1.6.0: ./ channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Mar 5 18:10:33 CST 2008
Author: russell
Date: Wed Mar 5 18:10:33 2008
New Revision: 106302
URL: http://svn.digium.com/view/asterisk?view=rev&rev=106302
Log:
Merged revisions 105734 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk
........
r105734 | russell | 2008-03-04 14:36:16 -0600 (Tue, 04 Mar 2008) | 6 lines
Fix some bugs in the SIP tcp helper thread.
- fix a spot where a lock wouldn't get unlocked in an error condition
- call ast_mutex_destroy() on the lock before freeing its memory
(related to issue #11972)
........
Modified:
branches/1.6.0/ (props changed)
branches/1.6.0/channels/chan_sip.c
Propchange: branches/1.6.0/
------------------------------------------------------------------------------
--- trunk-merged (original)
+++ trunk-merged Wed Mar 5 18:10:33 2008
@@ -1,1 +1,1 @@
-/trunk:1-105595,105675,105677,105733,106036,106040,106139
+/trunk:1-105595,105675,105677,105733-105734,106036,106040,106139
Modified: branches/1.6.0/channels/chan_sip.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.0/channels/chan_sip.c?view=diff&rev=106302&r1=106301&r2=106302
==============================================================================
--- branches/1.6.0/channels/chan_sip.c (original)
+++ branches/1.6.0/channels/chan_sip.c Wed Mar 5 18:10:33 2008
@@ -2200,8 +2200,10 @@
while (req.len < 4 || strncmp((char *)&req.data + req.len - 4, "\r\n\r\n", 4)) {
if (req.socket.lock)
ast_mutex_lock(req.socket.lock);
- if (!fgets(buf, sizeof(buf), ser->f))
+ if (!fgets(buf, sizeof(buf), ser->f)) {
+ ast_mutex_unlock(req.socket.lock);
goto cleanup;
+ }
if (req.socket.lock)
ast_mutex_unlock(req.socket.lock);
if (me->stop)
@@ -2237,7 +2239,12 @@
cleanup2:
fclose(ser->f);
ast_free(ser);
- ast_free(req.socket.lock);
+
+ if (req.socket.lock) {
+ ast_mutex_destroy(req.socket.lock);
+ ast_free(req.socket.lock);
+ req.socket.lock = NULL;
+ }
return NULL;
}
More information about the asterisk-commits
mailing list