From: Bart Polot Date: Thu, 14 Nov 2013 12:09:51 +0000 (+0000) Subject: - free data copy in case of error X-Git-Tag: initial-import-from-subversion-38251~6117 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=424bd7f5d06334c6562ab7a2c4e341b8fcf4e2e2;p=oweals%2Fgnunet.git - free data copy in case of error --- diff --git a/src/mesh/gnunet-service-mesh_connection.c b/src/mesh/gnunet-service-mesh_connection.c index 6b2edb403..b2c310c93 100644 --- a/src/mesh/gnunet-service-mesh_connection.c +++ b/src/mesh/gnunet-service-mesh_connection.c @@ -2373,6 +2373,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, if (0 == ttl) { GNUNET_break_op (0); + GNUNET_free (data); return NULL; } emsg->cid = c->id; @@ -2441,6 +2442,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, fc->queue_n--; fc->next_pid--; } + GNUNET_free (data); return NULL; /* Drop this message */ } @@ -2453,6 +2455,7 @@ GMC_send_prebuilt_message (const struct GNUNET_MessageHeader *message, if (NULL == q->q) { GNUNET_break (0); + GNUNET_free (data); GNUNET_free (q); return NULL; }