diff options
author | Nathan S. Evans <evans@in.tum.de> | 2010-05-07 10:46:59 +0000 |
---|---|---|
committer | Nathan S. Evans <evans@in.tum.de> | 2010-05-07 10:46:59 +0000 |
commit | 0c0c533d2bf3dcf27366de599fa601f0513dbbc3 (patch) | |
tree | 5a3372ec7aa820a95b73bc2cd3c4d36a4ded0ec0 /src/arm/arm_api.c | |
parent | 2ce194a89c97ad4d64ff1a4e7ee5eec84cf4eeec (diff) | |
download | gnunet-0c0c533d2bf3dcf27366de599fa601f0513dbbc3.tar.gz gnunet-0c0c533d2bf3dcf27366de599fa601f0513dbbc3.zip |
missing free
Diffstat (limited to 'src/arm/arm_api.c')
-rw-r--r-- | src/arm/arm_api.c | 9 |
1 files changed, 5 insertions, 4 deletions
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, | |||
449 | 449 | ||
450 | if (arm_shutdown_ctx->cb != NULL) | 450 | if (arm_shutdown_ctx->cb != NULL) |
451 | arm_shutdown_ctx->cb (arm_shutdown_ctx->cb_cls, reason); | 451 | arm_shutdown_ctx->cb (arm_shutdown_ctx->cb_cls, reason); |
452 | |||
453 | GNUNET_free(arm_shutdown_ctx); | ||
452 | } | 454 | } |
453 | 455 | ||
454 | 456 | ||
@@ -469,15 +471,14 @@ GNUNET_ARM_stop_service (struct GNUNET_ARM_Handle *h, | |||
469 | { | 471 | { |
470 | struct ARM_ShutdownContext *arm_shutdown_ctx; | 472 | struct ARM_ShutdownContext *arm_shutdown_ctx; |
471 | 473 | ||
472 | arm_shutdown_ctx = GNUNET_malloc(sizeof(struct ARM_ShutdownContext)); | ||
473 | arm_shutdown_ctx->cb = cb; | ||
474 | arm_shutdown_ctx->cb_cls = cb_cls; | ||
475 | |||
476 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, | 474 | GNUNET_log (GNUNET_ERROR_TYPE_INFO, |
477 | _("Stopping service `%s' within %llu ms\n"), service_name, | 475 | _("Stopping service `%s' within %llu ms\n"), service_name, |
478 | (unsigned long long) timeout.value); | 476 | (unsigned long long) timeout.value); |
479 | if (0 == strcasecmp ("arm", service_name)) | 477 | if (0 == strcasecmp ("arm", service_name)) |
480 | { | 478 | { |
479 | arm_shutdown_ctx = GNUNET_malloc(sizeof(struct ARM_ShutdownContext)); | ||
480 | arm_shutdown_ctx->cb = cb; | ||
481 | arm_shutdown_ctx->cb_cls = cb_cls; | ||
481 | GNUNET_CLIENT_service_shutdown (h->sched, h->client, timeout, &arm_shutdown_callback, arm_shutdown_ctx); | 482 | GNUNET_CLIENT_service_shutdown (h->sched, h->client, timeout, &arm_shutdown_callback, arm_shutdown_ctx); |
482 | h->client = NULL; | 483 | h->client = NULL; |
483 | return; | 484 | return; |