diff options
-rw-r--r-- | src/peerstore/peerstore_api.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c index cbe04c56b..0b7a7ebb2 100644 --- a/src/peerstore/peerstore_api.c +++ b/src/peerstore/peerstore_api.c | |||
@@ -721,6 +721,13 @@ void handle_watch_result (void *cls, const struct GNUNET_MessageHeader *msg) | |||
721 | PEERSTORE_hash_key(record->sub_system, | 721 | PEERSTORE_hash_key(record->sub_system, |
722 | record->peer, record->key, &keyhash); | 722 | record->peer, record->key, &keyhash); |
723 | wc = GNUNET_CONTAINER_multihashmap_get(h->watches, &keyhash); | 723 | wc = GNUNET_CONTAINER_multihashmap_get(h->watches, &keyhash); |
724 | if(NULL == wc) | ||
725 | { | ||
726 | LOG(GNUNET_ERROR_TYPE_ERROR, | ||
727 | _("Received a watch result for a non existing watch.\n")); | ||
728 | reconnect(h); | ||
729 | return; | ||
730 | } | ||
724 | if(NULL != wc->callback) | 731 | if(NULL != wc->callback) |
725 | wc->callback(wc->callback_cls, record, NULL); | 732 | wc->callback(wc->callback_cls, record, NULL); |
726 | PEERSTORE_destroy_record(record); | 733 | PEERSTORE_destroy_record(record); |