[asterisk-commits] mvanbaak: branch 1.6.1 r143086 - in /branches/1.6.1: ./ channels/chan_skinny.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sun Sep 14 17:24:30 CDT 2008


Author: mvanbaak
Date: Sun Sep 14 17:24:29 2008
New Revision: 143086

URL: http://svn.digium.com/view/asterisk?view=rev&rev=143086
Log:
Merged revisions 143082 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/trunk

........
  r143082 | mvanbaak | 2008-09-15 00:16:34 +0200 (Mon, 15 Sep 2008) | 11 lines
  
  plug a couple of memleaks in chan_skinny.
  
  (closes issue #13452)
  Reported by: pj
  Patches:
        memleak5.diff uploaded by wedhorn (license 30)
  Tested by: wedhorn, pj, mvanbaak
  
  (closes issue #13294)
  Reported by: pj
........

Modified:
    branches/1.6.1/   (props changed)
    branches/1.6.1/channels/chan_skinny.c

Propchange: branches/1.6.1/
------------------------------------------------------------------------------
Binary property 'trunk-merged' - no diff available.

Modified: branches/1.6.1/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/branches/1.6.1/channels/chan_skinny.c?view=diff&rev=143086&r1=143085&r2=143086
==============================================================================
--- branches/1.6.1/channels/chan_skinny.c (original)
+++ branches/1.6.1/channels/chan_skinny.c Sun Sep 14 17:24:29 2008
@@ -1851,7 +1851,7 @@
 	memcpy(s->outbuf+skinny_header_size, &req->data, letohl(req->len));
 
 	res = write(s->fd, s->outbuf, letohl(req->len)+8);
-
+	
 	if (res != letohl(req->len)+8) {
 		ast_log(LOG_WARNING, "Transmit: write only sent %d out of %d bytes: %s\n", res, letohl(req->len)+8, strerror(errno));
 		if (res == -1) {
@@ -1862,6 +1862,7 @@
 		
 	}
 	
+	ast_free(req);
 	ast_mutex_unlock(&s->lock);
 	return 1;
 }
@@ -1963,9 +1964,11 @@
 		req->data.stoptone.reference = htolel(reference);
 	}
 
-	if (tone > 0) {
-		req->data.starttone.tone = htolel(tone);
-	}
+	//Bad, tone is already set so this is redundant and a change to the if above
+	//may lead to issues where we try to set a tone to a stop_tone_message
+	//if (tone > 0) {
+	//	req->data.starttone.tone = htolel(tone);
+	//}
 	transmit_response(d, req);
 }
 
@@ -2029,8 +2032,10 @@
 		if (!(req = req_alloc(0, CLEAR_DISPLAY_MESSAGE)))
 			return;
 
-		req->data.clearpromptstatus.lineInstance = instance;
-		req->data.clearpromptstatus.callReference = reference;
+		//what do we want hear CLEAR_DISPLAY_MESSAGE or CLEAR_PROMPT_STATUS???
+		//if we are clearing the display, it appears there is no instance and refernece info (size 0)
+		//req->data.clearpromptstatus.lineInstance = instance;
+		//req->data.clearpromptstatus.callReference = reference;
 
 		if (skinnydebug)
 			ast_verb(1, "Clearing Display\n");
@@ -3516,6 +3521,7 @@
 		sub->rtp = NULL;
 	}
 	ast_mutex_unlock(&sub->lock);
+	ast_free(sub);
 	return 0;
 }
 




More information about the asterisk-commits mailing list