]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
[script] Reference actual object and do not create an indirect reference
authorCharlie Brej <cbrej@cs.man.ac.uk>
Wed, 9 Sep 2009 15:34:52 +0000 (16:34 +0100)
committerCharlie Brej <cbrej@cs.man.ac.uk>
Wed, 9 Sep 2009 20:17:07 +0000 (21:17 +0100)
src/plugins/splash/script/script-object.c

index 1d757dfe85868b4137e4839e1e4fdaf09b427598..3e0f3d6a73c2813125f81b7a2d55c4d86df9f454 100644 (file)
@@ -191,7 +191,8 @@ script_obj_t *script_obj_new_function (script_function_t *function)
 script_obj_t *script_obj_new_ref (script_obj_t *sub_obj)
 {
   script_obj_t *obj = malloc (sizeof (script_obj_t));
-
+  sub_obj = script_obj_deref_direct (sub_obj);
+  script_obj_ref (sub_obj);
   obj->type = SCRIPT_OBJ_TYPE_REF;
   obj->data.obj = sub_obj;
   obj->refcount = 1;