changeset 30947:0c60da8eb88c

Fix the possible leak in the function that's actually used.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 22 Nov 2010 02:39:10 +0000
parents 6cadf59c5835
children b64b2b05bd3c
files libpurple/protocols/msn/slpmsg_part.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/slpmsg_part.c	Mon Nov 22 02:38:29 2010 +0000
+++ b/libpurple/protocols/msn/slpmsg_part.c	Mon Nov 22 02:39:10 2010 +0000
@@ -28,13 +28,13 @@
 	const char *tmp;
 	int body_len;
 
-	tmp = data;
-	part = msn_slpmsgpart_new(NULL, NULL);
-
 	if (data_len < sizeof(*header)) {
 		return NULL;
 	}
 
+	part = msn_slpmsgpart_new(NULL, NULL);
+	tmp = data;
+
 	/* Extract the binary SLP header */
 	part->header = msn_p2p_header_from_wire((MsnP2PHeader*)tmp);
 	tmp += P2P_PACKET_HEADER_SIZE;