summaryrefslogtreecommitdiff
path: root/src/scripts.c
diff options
context:
space:
mode:
authorportix <none@none>2012-12-06 02:12:53 +0100
committerportix <none@none>2012-12-06 02:12:53 +0100
commit862f68b189786c3941cb8ed8b6ffc426a70fa5d6 (patch)
tree0d018634b5a6f930460330d62a4aec07a3336bfa /src/scripts.c
parent2dda9eb0e6e10f7baa2b0a7280e6be5992d44ae8 (diff)
downloaddwb-862f68b189786c3941cb8ed8b6ffc426a70fa5d6.zip
Fixing memory leak in connect_object
Diffstat (limited to 'src/scripts.c')
-rw-r--r--src/scripts.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/scripts.c b/src/scripts.c
index c1e65ef7..10765791 100644
--- a/src/scripts.c
+++ b/src/scripts.c
@@ -2243,8 +2243,11 @@ connect_object(JSContextRef ctx, JSObjectRef function, JSObjectRef this, size_t
goto error_out;
g_signal_query(signal_id, sig->query);
- if (sig->query->signal_id == 0)
+ if (sig->query->signal_id == 0)
+ {
+ ssignal_free(sig);
goto error_out;
+ }
sig->func = func;
id = g_signal_connect_data(o, name, G_CALLBACK(connect_callback), sig, (GClosureNotify)on_disconnect_object, flags);