changeset 228:666629903fa9

fixed memory leaks
author Yoshiki Yazawa <yaz@honeyplanet.jp>
date Sat, 27 Sep 2008 01:42:39 +0900
parents ed227c5765a2
children 29c741b1b921
files pidgin-twitter.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin-twitter.c	Sun Sep 21 18:09:50 2008 +0900
+++ b/pidgin-twitter.c	Sat Sep 27 01:42:39 2008 +0900
@@ -174,6 +174,7 @@
             tmp = g_strndup(startp, end - startp + 1); /* concat until '>' */
             tmp2 = g_strconcat(str, tmp, NULL);
             g_free(str);
+            g_free(tmp);
             str = tmp2;
             startp = end + 1;
             goto loop;
@@ -564,6 +565,7 @@
              }
              lastid = st->id;
 
+             g_free(sender);
              g_free(msg);
          }
 
@@ -2249,6 +2251,7 @@
             filename = g_strdup_printf("%s_%s.%s", user_name, suffix, *extp);
             path = g_build_filename(purple_prefs_get_string(OPT_ICON_DIR),
                                     filename, NULL);
+            g_free(filename);
 
             twitter_debug("path = %s\n", path);
 
@@ -2289,6 +2292,9 @@
                 g_free(path);
                 return;
             }
+
+            g_free(path);
+
         } /* for */
     } /* suffix */