[gjs] dbus: fix memory leak in DBus.bus.acquire_name
- From: Tommi Komulainen <tko src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gjs] dbus: fix memory leak in DBus.bus.acquire_name
- Date: Tue, 22 Feb 2011 12:14:05 +0000 (UTC)
commit 7859892af2b6a684b353219165be247fcad5c75a
Author: Tommi Komulainen <tko litl com>
Date: Fri Jan 7 15:46:26 2011 +0000
dbus: fix memory leak in DBus.bus.acquire_name
As reported by valgrind-check.
14 bytes in 1 blocks are definitely lost in loss record 301 of 1,270
at 0x4024F20: malloc (vg_replace_malloc.c:236)
by 0x40FAD63: g_malloc (gmem.c:164)
by 0x4113C18: g_strdup (gstrfuncs.c:102)
by 0x4037F11: gjs_string_get_ascii (jsapi-util-string.c:272)
by 0x5BE20D4: gjs_js_dbus_acquire_name (dbus.c:1178)
by 0x420A016: js_Interpret (in /opt/big/lib/libmozjs.so)
by 0x4213700: js_Execute (in /opt/big/lib/libmozjs.so)
by 0x41B8894: JS_EvaluateUCScriptForPrincipals (in /opt/big/lib/libmozjs.so)
by 0x41B897E: JS_EvaluateUCScript (in /opt/big/lib/libmozjs.so)
by 0x41BCF2F: JS_EvaluateScript (in /opt/big/lib/libmozjs.so)
by 0x4031BE3: gjs_context_eval (context.c:912)
by 0x4031EA7: gjs_context_eval_file (context.c:993)
https://bugzilla.gnome.org/show_bug.cgi?id=639167
modules/dbus.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/modules/dbus.c b/modules/dbus.c
index cfbd884..2b22c20 100644
--- a/modules/dbus.c
+++ b/modules/dbus.c
@@ -1145,6 +1145,8 @@ owner_closure_invalidated(gpointer data,
g_closure_unref(owner->acquired_closure);
g_closure_unref(owner->lost_closure);
+ g_free(owner->funcs.name);
+
g_slice_free(GjsJSDBusNameOwner, owner);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]