diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-06-24 08:51:46 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-06-24 08:51:46 +0000 |
commit | 8fede42a8013b9a3e3b2dbab687b403319227a79 (patch) | |
tree | 69c4d02166c64c11df619eda957b999f0456a5d5 /src/peerinfo | |
parent | 6646a17fc129acf1c2d397492f2ca9cda4b4b8b4 (diff) | |
download | gnunet-8fede42a8013b9a3e3b2dbab687b403319227a79.tar.gz gnunet-8fede42a8013b9a3e3b2dbab687b403319227a79.zip |
-LRN: Don't use freed ic
Diffstat (limited to 'src/peerinfo')
-rw-r--r-- | src/peerinfo/peerinfo_api.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index 75d312f84..17db1d494 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c | |||
@@ -523,13 +523,16 @@ peerinfo_handler (void *cls, const struct GNUNET_MessageHeader *msg) | |||
523 | /* normal end of list of peers, signal end, process next pending request */ | 523 | /* normal end of list of peers, signal end, process next pending request */ |
524 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 524 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
525 | "Received end of list of peers from `%s' service\n", "PEERINFO"); | 525 | "Received end of list of peers from `%s' service\n", "PEERINFO"); |
526 | GNUNET_PEERINFO_iterate_cancel (ic); | 526 | GNUNET_PEERINFO_iterate_cancel (ic); |
527 | trigger_transmit (h); | 527 | trigger_transmit (h); |
528 | if (GNUNET_NO == h->in_receive) | 528 | if (GNUNET_NO == h->in_receive) |
529 | { | 529 | { |
530 | h->in_receive = GNUNET_YES; | 530 | h->in_receive = GNUNET_YES; |
531 | GNUNET_CLIENT_receive (h->client, &peerinfo_handler, h, | 531 | if (h->ic_head != NULL) |
532 | GNUNET_TIME_absolute_get_remaining (ic->timeout)); | 532 | GNUNET_CLIENT_receive (h->client, &peerinfo_handler, h, |
533 | GNUNET_TIME_absolute_get_remaining (h->ic_head->timeout)); | ||
534 | else | ||
535 | GNUNET_break (0); | ||
533 | } | 536 | } |
534 | if (NULL != cb) | 537 | if (NULL != cb) |
535 | cb (cb_cls, NULL, NULL, NULL); | 538 | cb (cb_cls, NULL, NULL, NULL); |