diff options
-rw-r--r-- | src/scalarproduct/scalarproduct_api.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/scalarproduct/scalarproduct_api.c b/src/scalarproduct/scalarproduct_api.c index fc470eb20..a6d32f9ab 100644 --- a/src/scalarproduct/scalarproduct_api.c +++ b/src/scalarproduct/scalarproduct_api.c | |||
@@ -502,11 +502,11 @@ GNUNET_SCALARPRODUCT_cancel (struct GNUNET_SCALARPRODUCT_ComputationHandle * h) | |||
502 | if (qe == h) | 502 | if (qe == h) |
503 | { | 503 | { |
504 | GNUNET_CONTAINER_DLL_remove (head, tail, qe); | 504 | GNUNET_CONTAINER_DLL_remove (head, tail, qe); |
505 | if (NULL == qe->th) | 505 | if (NULL != qe->th) |
506 | GNUNET_CLIENT_notify_transmit_ready_cancel (qe->th); | 506 | GNUNET_CLIENT_notify_transmit_ready_cancel (qe->th); |
507 | GNUNET_CLIENT_disconnect (qe->client); | 507 | GNUNET_CLIENT_disconnect (qe->client); |
508 | GNUNET_STATISTICS_destroy (qe->stats, GNUNET_YES); | 508 | GNUNET_STATISTICS_destroy (qe->stats, GNUNET_YES); |
509 | GNUNET_free (qe->msg); | 509 | GNUNET_free_non_null (qe->msg); |
510 | GNUNET_free (qe); | 510 | GNUNET_free (qe); |
511 | break; | 511 | break; |
512 | } | 512 | } |
@@ -525,11 +525,11 @@ GNUNET_SCALARPRODUCT_disconnect () | |||
525 | for (qe = head; head != NULL; qe = head) | 525 | for (qe = head; head != NULL; qe = head) |
526 | { | 526 | { |
527 | GNUNET_CONTAINER_DLL_remove (head, tail, qe); | 527 | GNUNET_CONTAINER_DLL_remove (head, tail, qe); |
528 | if (NULL == qe->th) | 528 | if (NULL != qe->th) |
529 | GNUNET_CLIENT_notify_transmit_ready_cancel (qe->th); | 529 | GNUNET_CLIENT_notify_transmit_ready_cancel (qe->th); |
530 | GNUNET_CLIENT_disconnect (qe->client); | 530 | GNUNET_CLIENT_disconnect (qe->client); |
531 | GNUNET_STATISTICS_destroy (qe->stats, GNUNET_YES); | 531 | GNUNET_STATISTICS_destroy (qe->stats, GNUNET_YES); |
532 | GNUNET_free (qe->msg); | 532 | GNUNET_free_non_null (qe->msg); |
533 | GNUNET_free (qe); | 533 | GNUNET_free (qe); |
534 | } | 534 | } |
535 | } | 535 | } |