Permalink
Browse files

xmlnode_get_data mem leaks here and there

git-svn-id: file:///home/alek/pidgin-tlen@33 01e5c18c-cd3a-0410-a096-8782a5e0da38
  • Loading branch information...
1 parent 6f18bdf commit cc0ee0847df9bc8b698b656a4de1506687d2e182 alek committed Jan 2, 2009
Showing with 8 additions and 0 deletions.
  1. +4 −0 chat.c
  2. +4 −0 wb.c
View
4 chat.c
@@ -574,6 +574,7 @@ tlen_chat_process_subject(TlenChat *c, xmlnode *subject, char *nick)
g_free(decoded_data);
g_free(decoded_nick);
g_free(msg);
+ g_free(data);
}
/*
@@ -705,6 +706,7 @@ tlen_chat_process_message(TlenSession *s, xmlnode *xml, const char *from)
free(decoded_nick);
free(decoded_msg);
free(escaped_msg);
+ free(msg);
return 0;
}
@@ -1032,6 +1034,7 @@ tlen_chat_process_x(TlenSession *s, TlenChat *c, xmlnode *x, const char *roomid)
s->gc->account, NULL, NULL, inv_data, G_CALLBACK(accept_invitation), G_CALLBACK(reject_invitation));
g_free(decoded);
+ g_free(rdata);
}
}
@@ -1281,6 +1284,7 @@ tlen_chat_process_p(TlenSession *tlen, xmlnode *xml)
out:
g_free(decoded_nick);
g_free(decoded_login);
+ g_free(presence);
return 0;
}
View
4 wb.c
@@ -257,6 +257,7 @@ tlen_wb_process_data(PurpleWhiteboard *wb, xmlnode *data)
dx = strtol(p, &p, 10);
if (*p == '\0') {
purple_debug_info("tlen_wb", "invalid data\n");
+ g_free(d);
return;
}
@@ -265,6 +266,7 @@ tlen_wb_process_data(PurpleWhiteboard *wb, xmlnode *data)
dy = strtol(p, &p, 10);
if (*p == '\0') {
purple_debug_info("tlen_wb", "done\n");
+ g_free(d);
return;
}
@@ -301,6 +303,8 @@ tlen_wb_process_data(PurpleWhiteboard *wb, xmlnode *data)
p++;
}
+
+ g_free(d);
}
void

0 comments on commit cc0ee08

Please sign in to comment.