commit 0f33b9f44e6487c2ee5fa3d5da2a561165feddd4
parent c11ddaa003fd043e2f18216923cbbe1c0da09b39
Author: Christian Grothoff <christian@grothoff.org>
Date: Fri, 9 Oct 2026 23:34:36 +0200
add missing RC bumps
Diffstat:
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd_get-private-kyc.c b/src/backend/taler-merchant-httpd_get-private-kyc.c
@@ -175,7 +175,7 @@ struct KycContext
struct MHD_Connection *connection;
/**
- * Instance we are serving.
+ * Instance we are serving. We hold a reference.
*/
struct TMH_MerchantInstance *mi;
@@ -411,6 +411,7 @@ kyc_context_cleanup (void *cls)
kc_tail,
kc);
json_decref (kc->kycs_data);
+ TMH_instance_decref (kc->mi);
GNUNET_free (kc);
}
@@ -1771,6 +1772,11 @@ get_instances_ID_kyc (
{
kc = GNUNET_new (struct KycContext);
kc->mi = mi;
+ /* On the /management/ path, @a mi is not hc->instance, so
+ nothing else keeps it alive while we are suspended: an
+ instance reload or purge would otherwise free it. */
+ GNUNET_assert (mi->rc < UINT_MAX);
+ mi->rc++;
hc->ctx = kc;
hc->cc = &kyc_context_cleanup;
GNUNET_CONTAINER_DLL_insert (kc_head,