aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/core_api.c')
-rw-r--r--src/core/core_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/core_api.c b/src/core/core_api.c
index 5f21d8478..16aa788f9 100644
--- a/src/core/core_api.c
+++ b/src/core/core_api.c
@@ -317,8 +317,10 @@ request_start (void *cls, size_t size, void *buf)
317 struct GNUNET_CORE_TransmitHandle *th; 317 struct GNUNET_CORE_TransmitHandle *th;
318 size_t ret; 318 size_t ret;
319 319
320 h->cth = NULL; 320 h->cth = NULL;
321 th = h->pending_head; 321 th = h->pending_head;
322 if (th == NULL)
323 return 0;
322 if (buf == NULL) 324 if (buf == NULL)
323 { 325 {
324 timeout_request (th, NULL); 326 timeout_request (th, NULL);
@@ -811,6 +813,7 @@ GNUNET_CORE_disconnect (struct GNUNET_CORE_Handle *handle)
811 GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task); 813 GNUNET_SCHEDULER_cancel (handle->sched, handle->reconnect_task);
812 if (handle->client_notifications != NULL) 814 if (handle->client_notifications != NULL)
813 GNUNET_CLIENT_disconnect (handle->client_notifications, GNUNET_NO); 815 GNUNET_CLIENT_disconnect (handle->client_notifications, GNUNET_NO);
816 GNUNET_break (handle->pending_head == NULL);
814 GNUNET_free_non_null (handle->solicit_buffer); 817 GNUNET_free_non_null (handle->solicit_buffer);
815 GNUNET_free (handle); 818 GNUNET_free (handle);
816} 819}