aboutsummaryrefslogtreecommitdiff
path: root/src/peerinfo
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-05-21 11:15:20 +0000
committerChristian Grothoff <christian@grothoff.org>2010-05-21 11:15:20 +0000
commit0f7dfa3bd5f5118d398ba12ae001f679f7d96166 (patch)
tree78308a29e500be5657012594efa736265f607d87 /src/peerinfo
parentc63b92846b17552cbaaeeec67987c62b0361ebab (diff)
downloadgnunet-0f7dfa3bd5f5118d398ba12ae001f679f7d96166.tar.gz
gnunet-0f7dfa3bd5f5118d398ba12ae001f679f7d96166.zip
could theoretically be NULL, check
Diffstat (limited to 'src/peerinfo')
-rw-r--r--src/peerinfo/peerinfo_api.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c
index 7e9d9b2f0..5def415e9 100644
--- a/src/peerinfo/peerinfo_api.c
+++ b/src/peerinfo/peerinfo_api.c
@@ -232,14 +232,18 @@ do_transmit (void *cls, size_t size, void *buf)
232 ("Failed to transmit message of type %u to `%s' service.\n"), 232 ("Failed to transmit message of type %u to `%s' service.\n"),
233 ntohs (msg->type), "peerinfo"); 233 ntohs (msg->type), "peerinfo");
234#endif 234#endif
235 GNUNET_CONTAINER_DLL_remove (h->tq_head, 235 if (tqe != NULL)
236 h->tq_tail, 236 GNUNET_CONTAINER_DLL_remove (h->tq_head,
237 tqe); 237 h->tq_tail,
238 tqe);
238 reconnect (h); 239 reconnect (h);
239 trigger_transmit (h); 240 trigger_transmit (h);
240 if (tqe->cont != NULL) 241 if (tqe != NULL)
241 tqe->cont (tqe->cont_cls, GNUNET_SYSERR); 242 {
242 GNUNET_free (tqe); 243 if (tqe->cont != NULL)
244 tqe->cont (tqe->cont_cls, GNUNET_SYSERR);
245 GNUNET_free (tqe);
246 }
243 return 0; 247 return 0;
244 } 248 }
245 ret = tqe->size; 249 ret = tqe->size;