comparison libpurple/protocols/msn/slpmsg.c @ 30945:18c5d3c482c7

Fix possible leak.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Mon, 22 Nov 2010 00:01:39 +0000
parents 4e097dfb7784
children 6cadf59c5835
comparison
equal deleted inserted replaced
30944:e83879956437 30945:18c5d3c482c7
59 MsnSlpMessage *slpmsg; 59 MsnSlpMessage *slpmsg;
60 MsnP2PHeader *header; 60 MsnP2PHeader *header;
61 const char *tmp; 61 const char *tmp;
62 int body_len; 62 int body_len;
63 63
64 tmp = data;
65 slpmsg = msn_slpmsg_new(NULL);
66
67 if (data_len < sizeof(*header)) { 64 if (data_len < sizeof(*header)) {
68 return NULL; 65 return NULL;
69 } 66 }
67
68 tmp = data;
69 slpmsg = msn_slpmsg_new(NULL);
70 70
71 /* Extract the binary SLP header */ 71 /* Extract the binary SLP header */
72 slpmsg->header = msn_p2p_header_from_wire((MsnP2PHeader*)tmp); 72 slpmsg->header = msn_p2p_header_from_wire((MsnP2PHeader*)tmp);
73 73
74 /* Extract the body */ 74 /* Extract the body */