[jscore] Fix another PropertyNameArray leak
authorKalle Vahlman <kalle.vahlman@movial.com>
Mon, 27 Apr 2009 05:53:43 +0000 (08:53 +0300)
committerKalle Vahlman <kalle.vahlman@movial.com>
Mon, 27 Apr 2009 05:53:43 +0000 (08:53 +0300)
jscorebus/jscorebus-marshal.c

index 116db3fa7a1cd8c6c46774e066bf33c7b467e6d9..bf73e49a379009bea93732adb12ef1409f7af962 100644 (file)
@@ -200,6 +200,7 @@ gboolean jsvalue_append_to_message_iter(JSContextRef context,
                                                   NULL, &dictiter))
             {
               g_warning("Memory exhausted!");
+              JSPropertyNameArrayRelease(propnames);
               return FALSE;
             }
             jsstr = JSPropertyNameArrayGetNameAtIndex(propnames, i);
@@ -213,6 +214,7 @@ gboolean jsvalue_append_to_message_iter(JSContextRef context,
             dbus_free(cstr);
             dbus_message_iter_close_container(&subiter, &dictiter);
           }
+          JSPropertyNameArrayRelease(propnames);
           dbus_message_iter_close_container(iter, &subiter);
           break;
         } else {