pidgin: 1993306e: simple: sipmsg_free() can't handle NULL....

darkrain42 at pidgin.im darkrain42 at pidgin.im
Wed Apr 14 16:01:11 EDT 2010


-----------------------------------------------------------------
Revision: 1993306ee130a8c1c8eb294a1a05f86aa098cb9f
Ancestor: 7f87d4b5d3cc6e2b720d52df157f2e5d9ebe39ca
Author: darkrain42 at pidgin.im
Date: 2010-04-14T19:57:09
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1993306ee130a8c1c8eb294a1a05f86aa098cb9f

Modified files:
        libpurple/protocols/simple/simple.c

ChangeLog: 

simple: sipmsg_free() can't handle NULL.  Reported by Jochen

-------------- next part --------------
============================================================
--- libpurple/protocols/simple/simple.c	e77051328329a3efe451eded2a719e14dde5708e
+++ libpurple/protocols/simple/simple.c	59e4a147cd1445804992ec13946b9304ef70a805
@@ -1671,8 +1671,10 @@ static void simple_udp_process(gpointer 
 		buffer[len] = '\0';
 		purple_debug_info("simple", "\n\nreceived - %s\n######\n%s\n#######\n\n", ctime(&currtime), buffer);
 		msg = sipmsg_parse_msg(buffer);
-		if(msg) process_input_message(sip, msg);
-		sipmsg_free(msg);
+		if (msg) {
+			process_input_message(sip, msg);
+			sipmsg_free(msg);
+		}
 	}
 }
 


More information about the Commits mailing list