changeset 31386:18c5d3c482c7

Fix possible leak.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 22 Nov 2010 00:01:39 +0000
parents e83879956437
children 6cadf59c5835
files libpurple/protocols/msn/slpmsg.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slpmsg.c	Sun Nov 21 20:58:18 2010 +0000
+++ b/libpurple/protocols/msn/slpmsg.c	Mon Nov 22 00:01:39 2010 +0000
@@ -61,13 +61,13 @@
 	const char *tmp;
 	int body_len;
 
-	tmp = data;
-	slpmsg = msn_slpmsg_new(NULL);
-
 	if (data_len < sizeof(*header)) {
 		return NULL;
 	}
 
+	tmp = data;
+	slpmsg = msn_slpmsg_new(NULL);
+
 	/* Extract the binary SLP header */
 	slpmsg->header = msn_p2p_header_from_wire((MsnP2PHeader*)tmp);