1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-09-29 04:25:57 -04:00

Fix: Actually unref the instance on unref of object

This commit is contained in:
Philipp Schafft 2019-09-14 19:48:46 +00:00
parent bc46e9c976
commit c33ecbdcd3

View File

@ -198,6 +198,7 @@ igloo_error_t igloo_ro_unref(igloo_ro_t self)
base->refc--; base->refc--;
igloo_ro_unref(base->associated); igloo_ro_unref(base->associated);
igloo_ro_unref(base->instance);
if (base->name) if (base->name)
free(base->name); free(base->name);
@ -205,6 +206,7 @@ igloo_error_t igloo_ro_unref(igloo_ro_t self)
if (base->wrefc) { if (base->wrefc) {
/* only clear the object */ /* only clear the object */
base->associated = igloo_RO_NULL; base->associated = igloo_RO_NULL;
base->instance = igloo_RO_NULL;
base->name = NULL; base->name = NULL;
igloo_thread_mutex_unlock(&(base->lock)); igloo_thread_mutex_unlock(&(base->lock));
} else { } else {