gdbus: Fix double free and use after free of object path
authorStef Walter <stefw@gnome.org>
Fri, 17 Aug 2012 08:55:10 +0000 (10:55 +0200)
committerStef Walter <stefw@gnome.org>
Tue, 21 Aug 2012 11:21:26 +0000 (13:21 +0200)
 * This occurs when the 'g-object-path' property is read
   on a GDBusObjectSkeleton

https://bugzilla.gnome.org/show_bug.cgi?id=682075

gio/gdbusobjectskeleton.c

index 28881e6..aa283b1 100644 (file)
@@ -98,7 +98,7 @@ g_dbus_object_skeleton_get_property (GObject    *_object,
     {
     case PROP_G_OBJECT_PATH:
       g_mutex_lock (&object->priv->lock);
-      g_value_take_string (value, object->priv->object_path);
+      g_value_set_string (value, object->priv->object_path);
       g_mutex_unlock (&object->priv->lock);
       break;