GitLab repository storage has been migrated to hashed layout. Please contact Infrastructure team if you notice any issues with repositories or hooks.

Commit 7e50b0fe authored by Philip Chimento's avatar Philip Chimento 🚮

object: Ensure weak ref callback is removed on finalize

A use-after-free bug was caused by an object's weak ref callback being
called after the ObjectInstance* was freed.

Closes #129.
parent 575f1e2e
......@@ -1523,7 +1523,9 @@ object_instance_finalize(JSFreeOp *fop,
priv->info ? g_base_info_get_namespace((GIBaseInfo*) priv->info) : "",
priv->info ? g_base_info_get_name((GIBaseInfo*) priv->info) : g_type_name(priv->gtype));
if (!priv->g_object_finalized)
g_object_weak_unref(priv->gobj, wrapped_gobj_dispose_notify, priv);
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment