[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r13757 - gnunet/src/dht
From: |
gnunet |
Subject: |
[GNUnet-SVN] r13757 - gnunet/src/dht |
Date: |
Sat, 20 Nov 2010 18:55:45 +0100 |
Author: nevans
Date: 2010-11-20 18:55:45 +0100 (Sat, 20 Nov 2010)
New Revision: 13757
Modified:
gnunet/src/dht/gnunet-service-dht.c
Log:
only free when necessary (double free bug)
Modified: gnunet/src/dht/gnunet-service-dht.c
===================================================================
--- gnunet/src/dht/gnunet-service-dht.c 2010-11-20 15:28:33 UTC (rev 13756)
+++ gnunet/src/dht/gnunet-service-dht.c 2010-11-20 17:55:45 UTC (rev 13757)
@@ -2115,7 +2115,10 @@
pos = pos->next;
}
if (msg_ctx->bloom != NULL)
+ {
GNUNET_CONTAINER_bloomfilter_free(msg_ctx->bloom);
+ msg_ctx->bloom = NULL;
+ }
return 0;
}
@@ -3458,7 +3461,10 @@
}
#endif
if (msg_ctx->bloom != NULL)
+ {
GNUNET_CONTAINER_bloomfilter_free(msg_ctx->bloom);
+ msg_ctx->bloom = NULL;
+ }
return;
}
@@ -3506,7 +3512,6 @@
}
#endif
-
GNUNET_CONTAINER_bloomfilter_add (msg_ctx->bloom, &my_identity.hashPubKey);
hash_from_uid (msg_ctx->unique_id, &unique_hash);
if (GNUNET_YES == GNUNET_CONTAINER_multihashmap_contains (recent.hashmap,
&unique_hash))
@@ -3581,6 +3586,7 @@
{
GNUNET_CONTAINER_bloomfilter_or2(recent_req->bloom, msg_ctx->bloom,
DHT_BLOOM_SIZE);
GNUNET_CONTAINER_bloomfilter_free(msg_ctx->bloom);
+ msg_ctx->bloom = NULL;
}
}
@@ -4270,7 +4276,11 @@
msg_ctx->importance = DHT_DEFAULT_P2P_IMPORTANCE;
msg_ctx->timeout = DHT_DEFAULT_P2P_TIMEOUT;
demultiplex_message(enc_msg, msg_ctx);
- GNUNET_CONTAINER_bloomfilter_free (msg_ctx->bloom);
+ if (msg_ctx->bloom != NULL)
+ {
+ GNUNET_CONTAINER_bloomfilter_free (msg_ctx->bloom);
+ msg_ctx->bloom = NULL;
+ }
GNUNET_free(msg_ctx);
return GNUNET_YES;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r13757 - gnunet/src/dht,
gnunet <=