changeset 26743:f1b92f2ea41f

fixes one more potential leak of the same type
author Ka-Hing Cheung <khc@hxbc.us>
date Tue, 28 Apr 2009 22:25:49 +0000
parents a780680f090d
children 934bc523239f
files libpurple/protocols/oscar/family_locate.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/family_locate.c	Tue Apr 28 22:21:10 2009 +0000
+++ b/libpurple/protocols/oscar/family_locate.c	Tue Apr 28 22:25:49 2009 +0000
@@ -963,11 +963,14 @@
 
 	if ((snac2->family != SNAC_FAMILY_LOCATE) && (snac2->type != 0x0015)) {
 		purple_debug_misc("oscar", "locate error: received response from invalid request! %d\n", snac2->family);
+		g_free(snac2->data);
+		g_free(snac2);
 		return 0;
 	}
 
 	if (!(bn = snac2->data)) {
 		purple_debug_misc("oscar", "locate error: received response from request without a buddy name!\n");
+		g_free(snac2);
 		return 0;
 	}