From c33ecbdcd3effdc27ca0b38f6ccfc480120b5efb Mon Sep 17 00:00:00 2001 From: Philipp Schafft Date: Sat, 14 Sep 2019 19:48:46 +0000 Subject: [PATCH] Fix: Actually unref the instance on unref of object --- src/ro.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ro.c b/src/ro.c index 7b9e62e..393b997 100644 --- a/src/ro.c +++ b/src/ro.c @@ -198,6 +198,7 @@ igloo_error_t igloo_ro_unref(igloo_ro_t self) base->refc--; igloo_ro_unref(base->associated); + igloo_ro_unref(base->instance); if (base->name) free(base->name); @@ -205,6 +206,7 @@ igloo_error_t igloo_ro_unref(igloo_ro_t self) if (base->wrefc) { /* only clear the object */ base->associated = igloo_RO_NULL; + base->instance = igloo_RO_NULL; base->name = NULL; igloo_thread_mutex_unlock(&(base->lock)); } else {