# HG changeset patch # User Daniel Atallah # Date 1253029409 0 # Node ID 9c7fe51c153b31d7a5b8390c1cdb8512e6d81adf # Parent f15b14df260dc1f5b6857b7b9a921f5f88bdcea8 Avoid an unnecessary alloc/free. diff -r f15b14df260d -r 9c7fe51c153b pidgin/gtksound.c --- a/pidgin/gtksound.c Tue Sep 15 06:42:10 2009 +0000 +++ b/pidgin/gtksound.c Tue Sep 15 15:43:29 2009 +0000 @@ -617,19 +617,16 @@ pidgin_sound_is_customized(void) { gint i; - gchar *path, *file; + gchar *path; + const char *file; for (i = 0; i < PURPLE_NUM_SOUNDS; i++) { path = g_strdup_printf(PIDGIN_PREFS_ROOT "/sound/file/%s", sounds[i].pref); - file = g_strdup(purple_prefs_get_path(path)); + file = purple_prefs_get_path(path); g_free(path); - if (file && file[0] != '\0'){ - g_free(file); + if (file && file[0] != '\0') return TRUE; - } - - g_free(file); } return FALSE;