Mercurial > pidgin.yaz
changeset 16015:de619a9523f9
sf patch #1694728, from Andrew Gaul
plug 2 memleaks when setting icons. One of them
was leaking the size of the icon for Yahoo!, the other
was leaking a patch to an icon on the local file
system for oscar. Fantastico
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sun, 08 Apr 2007 22:29:42 +0000 |
parents | 85d93833a349 |
children | b60aaf9da8b1 |
files | libpurple/protocols/oscar/oscar.c libpurple/protocols/yahoo/yahoo_picture.c |
diffstat | 2 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c Sun Apr 08 15:05:11 2007 +0000 +++ b/libpurple/protocols/oscar/oscar.c Sun Apr 08 22:29:42 2007 +0000 @@ -4761,7 +4761,8 @@ PurpleBuddy *b; struct aim_ssi_item *curitem; guint32 tmp; - const char *icon_path, *cached_icon_path; + const char *icon_path; + char *cached_icon_path; va_list ap; guint16 fmtver, numitems; guint32 timestamp; @@ -4997,6 +4998,7 @@ icon_path = purple_account_get_buddy_icon(account); cached_icon_path = purple_buddy_icons_get_full_path(icon_path); oscar_set_icon(gc, cached_icon_path); + g_free(cached_icon_path); return 1; }
--- a/libpurple/protocols/yahoo/yahoo_picture.c Sun Apr 08 15:05:11 2007 +0000 +++ b/libpurple/protocols/yahoo/yahoo_picture.c Sun Apr 08 22:29:42 2007 +0000 @@ -544,6 +544,7 @@ int expire = purple_account_get_int(account, YAHOO_PICEXPIRE_SETTING, 0); const char *oldurl = purple_account_get_string(account, YAHOO_PICURL_SETTING, NULL); + g_free(icondata); yd->picture_checksum = g_string_hash(s); if ((yd->picture_checksum == oldcksum) &&