aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarish Krishnaswamy <kharish@novell.com>2006-11-21 00:41:45 +0800
committerHarish Krishnaswamy <kharish@src.gnome.org>2006-11-21 00:41:45 +0800
commitd15a54fc30933f62728b3b3e15fc3175ea0ef501 (patch)
treecb015cd39b2426a1072f67dbef93a57fde40b634
parente17affcfcc0c7d1dbf43cfc461223c5008cca206 (diff)
downloadgsoc2013-evolution-d15a54fc30933f62728b3b3e15fc3175ea0ef501.tar
gsoc2013-evolution-d15a54fc30933f62728b3b3e15fc3175ea0ef501.tar.gz
gsoc2013-evolution-d15a54fc30933f62728b3b3e15fc3175ea0ef501.tar.bz2
gsoc2013-evolution-d15a54fc30933f62728b3b3e15fc3175ea0ef501.tar.lz
gsoc2013-evolution-d15a54fc30933f62728b3b3e15fc3175ea0ef501.tar.xz
gsoc2013-evolution-d15a54fc30933f62728b3b3e15fc3175ea0ef501.tar.zst
gsoc2013-evolution-d15a54fc30933f62728b3b3e15fc3175ea0ef501.zip
Remove unreachable code and fix the leak of basename.
2006-11-20 Harish Krishnaswamy <kharish@novell.com> * e-icon-factory.c: (load_icon), (e_icon_factory_get_icon): Remove unreachable code and fix the leak of basename. svn path=/trunk/; revision=33007
-rw-r--r--e-util/ChangeLog5
-rw-r--r--e-util/e-icon-factory.c15
2 files changed, 8 insertions, 12 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 00faba7090..a0e1bf8f38 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -1,3 +1,8 @@
+2006-11-20 Harish Krishnaswamy <kharish@novell.com>
+
+ * e-icon-factory.c: (load_icon), (e_icon_factory_get_icon):
+ Remove unreachable code and fix the leak of basename.
+
2006-09-18 Matthew Barnes <mbarnes@redhat.com>
** Fixes bug #352450
diff --git a/e-util/e-icon-factory.c b/e-util/e-icon-factory.c
index 2a5cfb35f5..5471b5adab 100644
--- a/e-util/e-icon-factory.c
+++ b/e-util/e-icon-factory.c
@@ -124,6 +124,7 @@ load_icon (const char *icon_key, const char *icon_name, int size, int scale)
dent,
basename,
NULL);
+ g_free (basename);
if ((unscaled = gdk_pixbuf_new_from_file (filename, NULL)))
break;
}
@@ -308,18 +309,8 @@ e_icon_factory_get_icon (const char *icon_name, int icon_size)
pthread_mutex_lock (&lock);
if (!(icon = g_hash_table_lookup (name_to_icon, icon_key))) {
- if (!(icon = load_icon (icon_key, icon_name, size, TRUE))) {
- g_warning ("Icon not found -- %s", icon_name);
-
- /* Create an empty icon so that we don't keep spitting
- out the same warning over and over, every time this
- icon is requested. */
-
- icon = icon_new (icon_key, NULL);
- g_hash_table_insert (name_to_icon, icon->name, icon);
- } else {
- g_hash_table_insert (name_to_icon, icon->name, icon);
- }
+ icon = load_icon (icon_key, icon_name, size, TRUE);
+ g_hash_table_insert (name_to_icon, icon->name, icon);
}
if ((pixbuf = icon->pixbuf)) {