[jscore] Another signature leak
authorKalle Vahlman <kalle.vahlman@movial.com>
Thu, 23 Apr 2009 11:06:07 +0000 (14:06 +0300)
committerKalle Vahlman <kalle.vahlman@movial.com>
Thu, 23 Apr 2009 11:06:07 +0000 (14:06 +0300)
jscorebus/jscorebus-marshal.c

index e791ab3df203ff392d880a09bee675274bbefe49..4f35dd3213849dd52e4763ffad543dc18ca0a02b 100644 (file)
@@ -333,7 +333,7 @@ gboolean jsvalue_append_to_message_iter(JSContextRef context,
 
         for (i = 0; i < props; i++)
         {
-          const char *sig = dbus_signature_iter_get_signature(&stsiter);
+          char *sig = dbus_signature_iter_get_signature(&stsiter);
           JSValueRef child_value = JSObjectGetProperty(context,
             (JSObjectRef)value,
             JSPropertyNameArrayGetNameAtIndex(propnames, i),
@@ -344,8 +344,10 @@ gboolean jsvalue_append_to_message_iter(JSContextRef context,
           {
             g_warning("Failed to append struct contents with signature %s",
                       sig);
+            dbus_free(sig);
             return FALSE;
           }
+          dbus_free(sig);
 
           if (!dbus_signature_iter_next(&stsiter))
           {