[libpeas] Do not leave a dangling reference in testing plugins



commit 0a08b6fba4392bb0dba3a432226279aed75fdcbe
Author: Garrett Regier <garrettregier gmail com>
Date:   Wed Sep 21 01:30:29 2011 -0700

    Do not leave a dangling reference in testing plugins

 tests/plugins/builtin/builtin-plugin.c   |    2 +-
 tests/plugins/has-dep/has-dep-plugin.c   |    2 +-
 tests/plugins/loadable/loadable-plugin.c |    2 +-
 tests/plugins/self-dep/self-dep-plugin.c |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/plugins/builtin/builtin-plugin.c b/tests/plugins/builtin/builtin-plugin.c
index 222e33c..122cfee 100644
--- a/tests/plugins/builtin/builtin-plugin.c
+++ b/tests/plugins/builtin/builtin-plugin.c
@@ -60,7 +60,7 @@ testing_builtin_plugin_set_property (GObject      *object,
   switch (prop_id)
     {
     case PROP_OBJECT:
-      plugin->priv->object = g_value_dup_object (value);
+      plugin->priv->object = g_value_get_object (value);
       break;
 
     default:
diff --git a/tests/plugins/has-dep/has-dep-plugin.c b/tests/plugins/has-dep/has-dep-plugin.c
index 8c9d948..c265244 100644
--- a/tests/plugins/has-dep/has-dep-plugin.c
+++ b/tests/plugins/has-dep/has-dep-plugin.c
@@ -60,7 +60,7 @@ testing_has_dep_plugin_set_property (GObject      *object,
   switch (prop_id)
     {
     case PROP_OBJECT:
-      plugin->priv->object = g_value_dup_object (value);
+      plugin->priv->object = g_value_get_object (value);
       break;
 
     default:
diff --git a/tests/plugins/loadable/loadable-plugin.c b/tests/plugins/loadable/loadable-plugin.c
index 1464e86..456f675 100644
--- a/tests/plugins/loadable/loadable-plugin.c
+++ b/tests/plugins/loadable/loadable-plugin.c
@@ -60,7 +60,7 @@ testing_loadable_plugin_set_property (GObject      *object,
   switch (prop_id)
     {
     case PROP_OBJECT:
-      plugin->priv->object = g_value_dup_object (value);
+      plugin->priv->object = g_value_get_object (value);
       break;
 
     default:
diff --git a/tests/plugins/self-dep/self-dep-plugin.c b/tests/plugins/self-dep/self-dep-plugin.c
index 6f45c59..397a4b5 100644
--- a/tests/plugins/self-dep/self-dep-plugin.c
+++ b/tests/plugins/self-dep/self-dep-plugin.c
@@ -60,7 +60,7 @@ testing_self_dep_plugin_set_property (GObject      *object,
   switch (prop_id)
     {
     case PROP_OBJECT:
-      plugin->priv->object = g_value_dup_object (value);
+      plugin->priv->object = g_value_get_object (value);
       break;
 
     default:



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]