From: Nathan S. Evans Date: Fri, 7 May 2010 10:46:59 +0000 (+0000) Subject: missing free X-Git-Tag: initial-import-from-subversion-38251~21824 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0c0c533d2bf3dcf27366de599fa601f0513dbbc3;p=oweals%2Fgnunet.git missing free --- diff --git a/src/arm/arm_api.c b/src/arm/arm_api.c index 2f3524d67..a11ae2ef6 100644 --- a/src/arm/arm_api.c +++ b/src/arm/arm_api.c @@ -449,6 +449,8 @@ void arm_shutdown_callback (void *cls, if (arm_shutdown_ctx->cb != NULL) arm_shutdown_ctx->cb (arm_shutdown_ctx->cb_cls, reason); + + GNUNET_free(arm_shutdown_ctx); } @@ -469,15 +471,14 @@ GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h, { struct ARM_ShutdownContext *arm_shutdown_ctx; - arm_shutdown_ctx = GNUNET_malloc(sizeof(struct ARM_ShutdownContext)); - arm_shutdown_ctx->cb = cb; - arm_shutdown_ctx->cb_cls = cb_cls; - GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Stopping service `%s' within %llu ms\n"), service_name, (unsigned long long) timeout.value); if (0 == strcasecmp ("arm", service_name)) { + arm_shutdown_ctx = GNUNET_malloc(sizeof(struct ARM_ShutdownContext)); + arm_shutdown_ctx->cb = cb; + arm_shutdown_ctx->cb_cls = cb_cls; GNUNET_CLIENT_service_shutdown (h->sched, h->client, timeout, &arm_shutdown_callback, arm_shutdown_ctx); h->client = NULL; return;