[gnome-terminal] screen: Plug a mem leak
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-terminal] screen: Plug a mem leak
- Date: Thu, 24 Jan 2013 13:36:41 +0000 (UTC)
commit 706a64fc7106fb8811188afec71aa1643c632940
Author: Christian Persch <chpe gnome org>
Date: Thu Jan 24 14:10:57 2013 +0100
screen: Plug a mem leak
==5672== 8 bytes in 1 blocks are definitely lost in loss record 1,929 of 9,310
==5672== at 0x402A059: malloc (vg_replace_malloc.c:263)
==5672== by 0x6259D75: g_malloc (gmem.c:159)
==5672== by 0x625A0A1: g_malloc_n (gmem.c:400)
==5672== by 0x6273B58: g_strdup (gstrfuncs.c:364)
==5672== by 0x628E673: g_variant_dup_string (gvariant.c:1466)
==5672== by 0x608FD2B: g_settings_get_string (gsettings.c:1560)
==5672== by 0x8061153: terminal_screen_profile_changed_cb (terminal-screen.c:862)
src/terminal-screen.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index fa4e899..72617b9 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -857,9 +857,10 @@ terminal_screen_profile_changed_cb (GSettings *profile,
if (!prop_name || prop_name == I_(TERMINAL_PROFILE_ENCODING))
{
TerminalEncoding *encoding;
+ const char *str;
- encoding = terminal_app_ensure_encoding (terminal_app_get (),
- g_settings_get_string (profile, TERMINAL_PROFILE_ENCODING));
+ g_settings_get (profile, TERMINAL_PROFILE_ENCODING, "&s", &str);
+ encoding = terminal_app_ensure_encoding (terminal_app_get (), str);
vte_terminal_set_encoding (vte_terminal, terminal_encoding_get_charset (encoding));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]