summaryrefslogtreecommitdiff
path: root/gio/gdbusauth.c
diff options
context:
space:
mode:
authorChristian Persch <chpe@gnome.org>2010-05-14 18:21:01 +0200
committerChristian Persch <chpe@gnome.org>2010-05-15 00:12:18 +0200
commit60c53fef4788d4773704cb1affd2fb0f4d1d8830 (patch)
treedc43a2b2dbc98a3827b4d95c15769c6e9e1aa3f5 /gio/gdbusauth.c
parent5bc9d43288d4991b9c3ef1fc38d231113b633ec7 (diff)
Plug a mem leak in gdbusauth
From valgrind running gdbus-peer test: ==20513== 32 bytes in 1 blocks are definitely lost in loss record 1 of 15 ==20513== at 0x4024E4C: realloc (vg_replace_malloc.c:429) ==20513== by 0x4079BB1: g_realloc (gmem.c:174) ==20513== by 0x4099472: g_string_maybe_expand (gstring.c:396) ==20513== by 0x409A42A: g_string_insert_c (gstring.c:1050) ==20513== by 0x42169AC: g_string_append_c_inline (gstring.h:153) ==20513== by 0x421682C: _my_g_input_stream_read_line_safe (gdbusauth.c:336) ==20513== by 0x421843E: _g_dbus_auth_run_server (gdbusauth.c:1265) ==20513== by 0x4222B94: initable_init (gdbusconnection.c:1783) ==20513== by 0x41CF8D5: g_initable_init (ginitable.c:106) ==20513== by 0x41CFA8D: g_initable_new_valist (ginitable.c:219) ==20513== by 0x41CF920: g_initable_new (ginitable.c:139) ==20513== by 0x4223479: g_dbus_connection_new_sync (gdbusconnection.c:2046) Bug #618650.
Diffstat (limited to 'gio/gdbusauth.c')
-rw-r--r--gio/gdbusauth.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index d46f32a5c..35f100a6a 100644
--- a/gio/gdbusauth.c
+++ b/gio/gdbusauth.c
@@ -1278,6 +1278,7 @@ _g_dbus_auth_run_server (GDBusAuth *auth,
}
else if (g_strcmp0 (line, "NEGOTIATE_UNIX_FD") == 0)
{
+ g_free (line);
if (offered_capabilities & G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING)
{
negotiated_capabilities |= G_DBUS_CAPABILITY_FLAGS_UNIX_FD_PASSING;