summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommi Komulainen <tko@litl.com>2011-01-07 15:46:26 +0000
committerTommi Komulainen <tko@litl.com>2011-02-22 12:10:55 +0000
commit7859892af2b6a684b353219165be247fcad5c75a (patch)
treeff3d985c32aedeb1e2a14784c12d33297301b959
parent79e5160439afdebc2001b7d7197e99c27d063a05 (diff)
downloadgjs-GJS_0_7_11.tar.gz
dbus: fix memory leak in DBus.bus.acquire_nameGJS_0_7_11
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
-rw-r--r--modules/dbus.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/dbus.c b/modules/dbus.c
index cfbd884c..2b22c207 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);
}