pidgin: e97dfd6e: fixes a potential leak on error case

khc at pidgin.im khc at pidgin.im
Tue Apr 28 18:26:23 EDT 2009


-----------------------------------------------------------------
Revision: e97dfd6e35de719fe7bffabef680c282f4702341
Ancestor: 150aa7010128787a82ee3eb64eec7907e08235cc
Author: khc at pidgin.im
Date: 2009-04-28T22:20:13
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/e97dfd6e35de719fe7bffabef680c282f4702341

Modified files:
        libpurple/protocols/oscar/family_chatnav.c

ChangeLog: 

fixes a potential leak on error case


-------------- next part --------------
============================================================
--- libpurple/protocols/oscar/family_chatnav.c	64051463283c3fa0d3fdbecdd667c0f0cb8bab45
+++ libpurple/protocols/oscar/family_chatnav.c	da6e298c50af602a367342a79bcf2d6f118873d5
@@ -44,6 +44,8 @@ error(OscarData *od, FlapConnection *con
 
 	if (snac2->family != SNAC_FAMILY_CHATNAV) {
 		purple_debug_warning("oscar", "chatnav error: received response that maps to corrupt request (fam=%04x)\n", snac2->family);
+		g_free(snac2->data);
+		g_free(snac2);
 		return 0;
 	}
 
@@ -462,6 +464,8 @@ parseinfo(OscarData *od, FlapConnection 
 
 	if (snac2->family != SNAC_FAMILY_CHATNAV) {
 		purple_debug_misc("oscar", "faim: chatnav_parse_info: received response that maps to corrupt request! (fam=%04x)\n", snac2->family);
+		g_free(snac2->data);
+		g_free(snac2);
 		return 0;
 	}
 


More information about the Commits mailing list