[Asterisk-cvs] asterisk/channels chan_skinny.c,1.42,1.43

anthm at lists.digium.com anthm at lists.digium.com
Fri May 28 23:25:27 CDT 2004


Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv13866/channels

Modified Files:
	chan_skinny.c 
Log Message:
saw this in valgrind (-tony)

Index: chan_skinny.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_skinny.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- chan_skinny.c	27 May 2004 04:18:46 -0000	1.42
+++ chan_skinny.c	29 May 2004 03:40:35 -0000	1.43
@@ -2539,6 +2539,7 @@
 		hp = ast_gethostbyname(ourhost, &ahp);
 		if (!hp) {
 			ast_log(LOG_WARNING, "Unable to get our IP address, Skinny disabled\n");
+			ast_destroy(cfg);
 			return 0;
 		}
 		memcpy(&__ourip, hp->h_addr, sizeof(__ourip));
@@ -2574,6 +2575,7 @@
 		skinnysock = socket(AF_INET, SOCK_STREAM, 0);
 		if(setsockopt(skinnysock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
 			ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s", errno, strerror(errno));
+			ast_destroy(cfg);
 			return 0;
 		}
 
@@ -2586,6 +2588,7 @@
 							strerror(errno));
 				close(skinnysock);
 				skinnysock = -1;
+				ast_destroy(cfg);
 				return 0;
 			} 
 
@@ -2595,6 +2598,7 @@
 							strerror(errno));
 					close(skinnysock);
 					skinnysock = -1;
+					ast_destroy(cfg);
 					return 0;
 			}
 		




More information about the svn-commits mailing list