[gthumb/ext] fixed other minor memory leaks
- From: Paolo Bacchilega <paobac src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gthumb/ext] fixed other minor memory leaks
- Date: Wed, 9 Sep 2009 09:02:35 +0000 (UTC)
commit 4d1b0df586395e7fcfded298aae150df20ad2b0e
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Sep 9 11:01:01 2009 +0200
fixed other minor memory leaks
gthumb/glib-utils.c | 5 +++--
gthumb/gth-preferences.c | 7 ++++++-
2 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/gthumb/glib-utils.c b/gthumb/glib-utils.c
index 979f754..be6804c 100644
--- a/gthumb/glib-utils.c
+++ b/gthumb/glib-utils.c
@@ -680,9 +680,9 @@ _g_replace (const char *str,
gstr = g_string_new (NULL);
for (i = 0; tokens[i] != NULL; i++) {
- gstr = g_string_append (gstr, tokens[i]);
+ g_string_append (gstr, tokens[i]);
if ((to_str != NULL) && (tokens[i+1] != NULL))
- gstr = g_string_append (gstr, to_str);
+ g_string_append (gstr, to_str);
}
g_strfreev (tokens);
@@ -2033,6 +2033,7 @@ _g_file_attributes_matches_mask (const char *attributes,
}
g_strfreev (mask_v);
+ g_strfreev (attributes_v);
return matches;
}
diff --git a/gthumb/gth-preferences.c b/gthumb/gth-preferences.c
index 1ca9a26..0b4bddb 100644
--- a/gthumb/gth-preferences.c
+++ b/gthumb/gth-preferences.c
@@ -53,7 +53,12 @@ gth_pref_initialize (void)
if (eel_gconf_get_boolean (PREF_USE_STARTUP_LOCATION, FALSE) ||
eel_gconf_get_boolean (PREF_GO_TO_LAST_LOCATION, FALSE))
{
- gth_pref_set_startup_location (eel_gconf_get_path (PREF_STARTUP_LOCATION, NULL));
+ char *startup_location;
+
+ startup_location = eel_gconf_get_path (PREF_STARTUP_LOCATION, NULL);
+ gth_pref_set_startup_location (startup_location);
+
+ g_free (startup_location);
}
else {
char *current_dir;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]