gnome-terminal r2831 - trunk/src
- From: chpe svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-terminal r2831 - trunk/src
- Date: Thu, 29 May 2008 19:58:20 +0000 (UTC)
Author: chpe
Date: Thu May 29 19:58:20 2008
New Revision: 2831
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=2831&view=rev
Log:
Plug a mem leak.
Modified:
trunk/src/terminal-profile.c
Modified: trunk/src/terminal-profile.c
==============================================================================
--- trunk/src/terminal-profile.c (original)
+++ trunk/src/terminal-profile.c Thu May 29 19:58:20 2008
@@ -742,7 +742,7 @@
/* Backward compatibility */
string = gconf_enum_to_string ((GConfEnumStringPair*) erase_bindings, g_value_get_enum (value));
if (!string)
- return;
+ goto cleanup;
}
else
return;
@@ -756,7 +756,7 @@
color = g_value_get_boxed (value);
if (!color)
- return;
+ goto cleanup;
g_snprintf (str, sizeof (str),
"#%04X%04X%04X",
@@ -773,7 +773,7 @@
font_desc = g_value_get_boxed (value);
if (!font_desc)
- return;
+ goto cleanup;
font = pango_font_description_to_string (font_desc);
gconf_change_set_set_string (changeset, key, font);
@@ -796,7 +796,7 @@
array = g_value_get_boxed (value);
if (!array)
- return;
+ goto cleanup;
n_colors = array->n_values;
string = g_string_sized_new (n_colors * (1 /* # */ + 3 * 4) + n_colors /* : separators and terminating \0 */);
@@ -823,6 +823,9 @@
}
else
g_printerr ("Unhandled value type %s of pspec %s\n", g_type_name (G_PARAM_SPEC_VALUE_TYPE (pspec)), pspec->name);
+
+cleanup:
+ g_free (key);
}
static gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]