[jscorebus] Fix memory leaks related to callback argument arrays
authorKalle Vahlman <kalle.vahlman@movial.com>
Wed, 15 Apr 2009 09:40:08 +0000 (12:40 +0300)
committerKalle Vahlman <kalle.vahlman@movial.com>
Wed, 15 Apr 2009 09:40:08 +0000 (12:40 +0300)
jscorebus/jscorebus-marshal.c
jscorebus/jscorebus-method.c

index fe4c103d6412cb90c57927f303e6edb6fa1da52d..10cf3f4478bbfbcf81fd3328be051f1a92b5e976 100644 (file)
@@ -669,5 +669,6 @@ void call_function_with_message_args(JSContextRef context,
 
   JSObjectCallAsFunction(context, function, thisObject,
                          argumentCount, args, NULL);
+  g_free(args);
 }
 
index 581d1dc8aac6f076f6382420e953ef817a3fc11b..f8f298bb6a1ab212ff9b6ed813baa82a59f373d7 100644 (file)
@@ -406,6 +406,7 @@ void call_onerror(JSContextRef context,
                            2, args, NULL);
     JSStringRelease(name);
     JSStringRelease(str);
+    g_free(args);
     return;
   }