aboutsummaryrefslogtreecommitdiff
path: root/src/peerstore/peerstore_api.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2014-12-16 19:28:42 +0000
committerChristian Grothoff <christian@grothoff.org>2014-12-16 19:28:42 +0000
commite1d1a9d0dad8ea9919c6008401063423772134c6 (patch)
treed2b89076da646eb2aeb2be3f29bef71d58b93338 /src/peerstore/peerstore_api.c
parente5b1301f208d9f1220b0d3de35e3283e1be177e0 (diff)
downloadgnunet-e1d1a9d0dad8ea9919c6008401063423772134c6.tar.gz
gnunet-e1d1a9d0dad8ea9919c6008401063423772134c6.zip
-fix leak
Diffstat (limited to 'src/peerstore/peerstore_api.c')
-rw-r--r--src/peerstore/peerstore_api.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/peerstore/peerstore_api.c b/src/peerstore/peerstore_api.c
index 05e2f552c..122f49c59 100644
--- a/src/peerstore/peerstore_api.c
+++ b/src/peerstore/peerstore_api.c
@@ -786,7 +786,7 @@ GNUNET_PEERSTORE_iterate (struct GNUNET_PEERSTORE_Handle *h,
786/** 786/**
787 * When a watch record is received 787 * When a watch record is received
788 * 788 *
789 * @param cls a 'struct GNUNET_PEERSTORE_Handle *' 789 * @param cls a `struct GNUNET_PEERSTORE_Handle *`
790 * @param msg message received, NULL on timeout or fatal error 790 * @param msg message received, NULL on timeout or fatal error
791 */ 791 */
792static void 792static void
@@ -800,12 +800,12 @@ handle_watch_result (void *cls, const struct GNUNET_MessageHeader *msg)
800 if (NULL == msg) 800 if (NULL == msg)
801 { 801 {
802 LOG (GNUNET_ERROR_TYPE_ERROR, 802 LOG (GNUNET_ERROR_TYPE_ERROR,
803 _ 803 _("Problem receiving a watch response, no way to determine which request.\n"));
804 ("Problem receiving a watch response, no way to determine which request.\n"));
805 reconnect (h); 804 reconnect (h);
806 return; 805 return;
807 } 806 }
808 LOG (GNUNET_ERROR_TYPE_DEBUG, "Received a watch record from service.\n"); 807 LOG (GNUNET_ERROR_TYPE_DEBUG,
808 "Received a watch record from service.\n");
809 record = PEERSTORE_parse_record_message (msg); 809 record = PEERSTORE_parse_record_message (msg);
810 PEERSTORE_hash_key (record->sub_system, record->peer, record->key, &keyhash); 810 PEERSTORE_hash_key (record->sub_system, record->peer, record->key, &keyhash);
811 wc = GNUNET_CONTAINER_multihashmap_get (h->watches, &keyhash); 811 wc = GNUNET_CONTAINER_multihashmap_get (h->watches, &keyhash);
@@ -813,6 +813,7 @@ handle_watch_result (void *cls, const struct GNUNET_MessageHeader *msg)
813 { 813 {
814 LOG (GNUNET_ERROR_TYPE_ERROR, 814 LOG (GNUNET_ERROR_TYPE_ERROR,
815 _("Received a watch result for a non existing watch.\n")); 815 _("Received a watch result for a non existing watch.\n"));
816 PEERSTORE_destroy_record (record);
816 reconnect (h); 817 reconnect (h);
817 return; 818 return;
818 } 819 }
@@ -825,7 +826,7 @@ handle_watch_result (void *cls, const struct GNUNET_MessageHeader *msg)
825/** 826/**
826 * Callback after MQ envelope is sent 827 * Callback after MQ envelope is sent
827 * 828 *
828 * @param cls a 'struct GNUNET_PEERSTORE_WatchContext *' 829 * @param cls a `struct GNUNET_PEERSTORE_WatchContext *`
829 */ 830 */
830static void 831static void
831watch_request_sent (void *cls) 832watch_request_sent (void *cls)