From e6882fcf36d2669c858f2c1801b657c768ed9b14 Mon Sep 17 00:00:00 2001 From: o9000 Date: Sat, 22 Oct 2011 00:52:55 +0000 Subject: [PATCH] Fix possible double free in launcher git-svn-id: http://tint2.googlecode.com/svn/trunk@643 121b4492-b84c-0410-8b4c-0d4edfb3f3cc --- src/launcher/launcher.c | 3 ++- src/launcher/xsettings-client.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/launcher/launcher.c b/src/launcher/launcher.c index 2dba4fd..b62c597 100644 --- a/src/launcher/launcher.c +++ b/src/launcher/launcher.c @@ -119,7 +119,8 @@ void cleanup_launcher() g_slist_free(launcher->list_apps); launcher->list_apps = NULL; } - g_free(icon_theme_name); + free(icon_theme_name); + icon_theme_name = 0; launcher_enabled = 0; } diff --git a/src/launcher/xsettings-client.c b/src/launcher/xsettings-client.c index e888dc9..a66c4b7 100644 --- a/src/launcher/xsettings-client.c +++ b/src/launcher/xsettings-client.c @@ -54,7 +54,7 @@ void xsettings_notify_cb (const char *name, XSettingsAction action, XSettingsSet if (icon_theme_name) { if (strcmp(icon_theme_name, setting->data.v_string) == 0) return; - g_free(icon_theme_name); + free(icon_theme_name); } icon_theme_name = strdup(setting->data.v_string);