[gedit] Free the scheme string when it is the same as the old one.
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] Free the scheme string when it is the same as the old one.
- Date: Wed, 6 Apr 2011 05:39:54 +0000 (UTC)
commit db0a51785352892d1bb1abe4487d91d66f21f803
Author: Paolo Borelli <pborelli gnome org>
Date: Wed Apr 6 06:07:55 2011 +0200
Free the scheme string when it is the same as the old one.
gedit/gedit-settings.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/gedit/gedit-settings.c b/gedit/gedit-settings.c
index b35102c..bf0be5e 100644
--- a/gedit/gedit-settings.c
+++ b/gedit/gedit-settings.c
@@ -235,8 +235,12 @@ on_scheme_changed (GSettings *settings,
scheme = g_settings_get_string (settings, key);
- if (gs->priv->old_scheme != NULL && (strcmp (scheme, gs->priv->old_scheme) == 0))
+ if (gs->priv->old_scheme != NULL &&
+ (strcmp (scheme, gs->priv->old_scheme) == 0))
+ {
+ g_free (scheme);
return;
+ }
g_free (gs->priv->old_scheme);
gs->priv->old_scheme = scheme;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]