diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-02-17 14:42:56 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-02-17 14:42:56 +0000 |
commit | 28061a2a790460a7e27e292cddfce47d6a02d63f (patch) | |
tree | b52da712b02d27c66a9201bd1a800929bbcbeddf /src/topology | |
parent | ac186e5c747ebefa967c64a7ee722afb59652943 (diff) | |
download | gnunet-28061a2a790460a7e27e292cddfce47d6a02d63f.tar.gz gnunet-28061a2a790460a7e27e292cddfce47d6a02d63f.zip |
leaks
Diffstat (limited to 'src/topology')
-rw-r--r-- | src/topology/gnunet-daemon-topology.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c index 1546dc764..30ad925a7 100644 --- a/src/topology/gnunet-daemon-topology.c +++ b/src/topology/gnunet-daemon-topology.c | |||
@@ -507,6 +507,9 @@ free_peer (struct PeerList *peer) | |||
507 | if (pos->hello_delay_task != GNUNET_SCHEDULER_NO_TASK) | 507 | if (pos->hello_delay_task != GNUNET_SCHEDULER_NO_TASK) |
508 | GNUNET_SCHEDULER_cancel (sched, | 508 | GNUNET_SCHEDULER_cancel (sched, |
509 | pos->hello_delay_task); | 509 | pos->hello_delay_task); |
510 | GNUNET_free_non_null (pos->hello); | ||
511 | if (pos->filter != NULL) | ||
512 | GNUNET_CONTAINER_bloomfilter_free (peer->filter); | ||
510 | GNUNET_free (pos); | 513 | GNUNET_free (pos); |
511 | } | 514 | } |
512 | 515 | ||
@@ -841,7 +844,6 @@ consider_for_advertising (const struct GNUNET_HELLO_Message *hello) | |||
841 | if (peer == NULL) | 844 | if (peer == NULL) |
842 | peer = make_peer (&pid, hello, GNUNET_NO); | 845 | peer = make_peer (&pid, hello, GNUNET_NO); |
843 | // FIXME: check if 'hello' is any different from peer->hello? | 846 | // FIXME: check if 'hello' is any different from peer->hello? |
844 | GNUNET_free_non_null (peer->hello); | ||
845 | #if DEBUG_TOPOLOGY | 847 | #if DEBUG_TOPOLOGY |
846 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 848 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
847 | "Found `%s' from peer `%s' for advertising\n", | 849 | "Found `%s' from peer `%s' for advertising\n", |
@@ -849,6 +851,7 @@ consider_for_advertising (const struct GNUNET_HELLO_Message *hello) | |||
849 | GNUNET_i2s (&pid)); | 851 | GNUNET_i2s (&pid)); |
850 | #endif | 852 | #endif |
851 | size = GNUNET_HELLO_size (hello); | 853 | size = GNUNET_HELLO_size (hello); |
854 | GNUNET_free_non_null (peer->hello); | ||
852 | peer->hello = GNUNET_malloc (size); | 855 | peer->hello = GNUNET_malloc (size); |
853 | memcpy (peer->hello, hello, size); | 856 | memcpy (peer->hello, hello, size); |
854 | if (peer->filter != NULL) | 857 | if (peer->filter != NULL) |