diff options
Diffstat (limited to 'src/identity/identity_api.c')
-rw-r--r-- | src/identity/identity_api.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/identity/identity_api.c b/src/identity/identity_api.c index 931deb509..38c9efdd4 100644 --- a/src/identity/identity_api.c +++ b/src/identity/identity_api.c | |||
@@ -952,13 +952,6 @@ GNUNET_IDENTITY_disconnect (struct GNUNET_IDENTITY_Handle *h) | |||
952 | struct GNUNET_IDENTITY_Operation *op; | 952 | struct GNUNET_IDENTITY_Operation *op; |
953 | 953 | ||
954 | GNUNET_assert (NULL != h); | 954 | GNUNET_assert (NULL != h); |
955 | while (NULL != (op = h->op_head)) | ||
956 | { | ||
957 | GNUNET_CONTAINER_DLL_remove (h->op_head, | ||
958 | h->op_tail, | ||
959 | op); | ||
960 | GNUNET_free (op); | ||
961 | } | ||
962 | if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK) | 955 | if (h->reconnect_task != GNUNET_SCHEDULER_NO_TASK) |
963 | { | 956 | { |
964 | GNUNET_SCHEDULER_cancel (h->reconnect_task); | 957 | GNUNET_SCHEDULER_cancel (h->reconnect_task); |
@@ -977,6 +970,14 @@ GNUNET_IDENTITY_disconnect (struct GNUNET_IDENTITY_Handle *h) | |||
977 | GNUNET_CONTAINER_multihashmap_destroy (h->egos); | 970 | GNUNET_CONTAINER_multihashmap_destroy (h->egos); |
978 | h->egos = NULL; | 971 | h->egos = NULL; |
979 | } | 972 | } |
973 | GNUNET_break (NULL == h->op_head); | ||
974 | while (NULL != (op = h->op_head)) | ||
975 | { | ||
976 | GNUNET_CONTAINER_DLL_remove (h->op_head, | ||
977 | h->op_tail, | ||
978 | op); | ||
979 | GNUNET_free (op); | ||
980 | } | ||
980 | if (NULL != h->client) | 981 | if (NULL != h->client) |
981 | { | 982 | { |
982 | GNUNET_CLIENT_disconnect (h->client); | 983 | GNUNET_CLIENT_disconnect (h->client); |