X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Futil%2Fserver_tc.c;h=b7158dadbd345266bfd6ed9e2e07895ed48f6205;hb=8dfd7bda2f139e2dac27e804167eedc3d227453e;hp=7514b0cd334c54d5666e3efa2b499ab37d6996ac;hpb=48436941449d867ef9a32ddf29439c5017d37775;p=oweals%2Fgnunet.git diff --git a/src/util/server_tc.c b/src/util/server_tc.c index 7514b0cd3..b7158dadb 100644 --- a/src/util/server_tc.c +++ b/src/util/server_tc.c @@ -82,6 +82,7 @@ transmit_response (void *cls, size_t size, void *buf) if (buf == NULL) { GNUNET_SERVER_receive_done (tc->client, GNUNET_SYSERR); + GNUNET_SERVER_client_drop (tc->client); GNUNET_free_non_null (tc->buf); GNUNET_free (tc); return 0; @@ -95,6 +96,7 @@ transmit_response (void *cls, size_t size, void *buf) if (tc->total == tc->off) { GNUNET_SERVER_receive_done (tc->client, GNUNET_OK); + GNUNET_SERVER_client_drop (tc->client); GNUNET_free_non_null (tc->buf); GNUNET_free (tc); } @@ -111,6 +113,7 @@ transmit_response (void *cls, size_t size, void *buf) { GNUNET_break (0); GNUNET_SERVER_receive_done (tc->client, GNUNET_SYSERR); + GNUNET_SERVER_client_drop (tc->client); GNUNET_free_non_null (tc->buf); GNUNET_free (tc); } @@ -133,6 +136,7 @@ GNUNET_SERVER_transmit_context_create (struct GNUNET_SERVER_Client *client) GNUNET_assert (client != NULL); tc = GNUNET_malloc (sizeof (struct GNUNET_SERVER_TransmitContext)); + GNUNET_SERVER_client_keep (client); tc->client = client; return tc; } @@ -213,6 +217,7 @@ GNUNET_SERVER_transmit_context_run (struct GNUNET_SERVER_TransmitContext *tc, { GNUNET_break (0); GNUNET_SERVER_receive_done (tc->client, GNUNET_SYSERR); + GNUNET_SERVER_client_drop (tc->client); GNUNET_free_non_null (tc->buf); GNUNET_free (tc); }