Mercurial > pidgin.yaz
changeset 26809:83ae84d4b000
fixes a potential leak on error case
author | Ka-Hing Cheung <khc@hxbc.us> |
---|---|
date | Tue, 28 Apr 2009 22:20:13 +0000 |
parents | 79584167519a |
children | a780680f090d |
files | libpurple/protocols/oscar/family_chatnav.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_chatnav.c Tue Apr 28 19:14:04 2009 +0000 +++ b/libpurple/protocols/oscar/family_chatnav.c Tue Apr 28 22:20:13 2009 +0000 @@ -44,6 +44,8 @@ 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 @@ 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; }