summaryrefslogtreecommitdiff
path: root/src/util/container_bloomfilter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/container_bloomfilter.c')
-rw-r--r--src/util/container_bloomfilter.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/container_bloomfilter.c b/src/util/container_bloomfilter.c
index 645729553..9554e0ec0 100644
--- a/src/util/container_bloomfilter.c
+++ b/src/util/container_bloomfilter.c
@@ -494,7 +494,7 @@ GNUNET_CONTAINER_bloomfilter_load (const char *filename, size_t size,
ui *= 2;
size = ui; /* make sure it's a power of 2 */
- bf = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_BloomFilter));
+ bf = GNUNET_new (struct GNUNET_CONTAINER_BloomFilter);
/* Try to open a bloomfilter file */
if (GNUNET_YES == GNUNET_DISK_file_test (filename))
bf->fh =
@@ -631,7 +631,7 @@ GNUNET_CONTAINER_bloomfilter_init (const char *data, size_t size,
if ((0 == k) || (0 == size))
return NULL;
- bf = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_BloomFilter));
+ bf = GNUNET_new (struct GNUNET_CONTAINER_BloomFilter);
bf->filename = NULL;
bf->fh = NULL;
bf->bitArray = GNUNET_malloc_large (size);