[glib] Plug a mem leak in gdbusauth
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Plug a mem leak in gdbusauth
- Date: Fri, 14 May 2010 22:12:48 +0000 (UTC)
commit 60c53fef4788d4773704cb1affd2fb0f4d1d8830
Author: Christian Persch <chpe gnome org>
Date: Fri May 14 18:21:01 2010 +0200
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.
gio/gdbusauth.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gio/gdbusauth.c b/gio/gdbusauth.c
index d46f32a..35f100a 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]