summaryrefslogtreecommitdiff
path: root/src/ats/plugin_ats_proportional.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/plugin_ats_proportional.c')
-rw-r--r--src/ats/plugin_ats_proportional.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ats/plugin_ats_proportional.c b/src/ats/plugin_ats_proportional.c
index 82a41d39f..62f571e5b 100644
--- a/src/ats/plugin_ats_proportional.c
+++ b/src/ats/plugin_ats_proportional.c
@@ -409,7 +409,7 @@ libgnunet_plugin_ats_proportional_init (void *cls)
GNUNET_assert(NULL != env->get_preferences);
GNUNET_assert(NULL != env->get_property);
- s = GNUNET_malloc (sizeof (struct GAS_PROPORTIONAL_Handle));
+ s = GNUNET_new (struct GAS_PROPORTIONAL_Handle);
s->env = env;
env->sf.s_add = &GAS_proportional_address_add;
env->sf.s_address_update_property = &GAS_proportional_address_property_changed;
@@ -1572,12 +1572,12 @@ GAS_proportional_address_add (void *solver, struct ATS_Address *address,
return;
}
- aw = GNUNET_malloc (sizeof (struct AddressWrapper));
+ aw = GNUNET_new (struct AddressWrapper);
aw->addr = address;
GNUNET_CONTAINER_DLL_insert(net->head, net->tail, aw);
addresse_increment (s, net, GNUNET_YES, GNUNET_NO);
- asi = GNUNET_malloc (sizeof (struct AddressSolverInformation));
+ asi = GNUNET_new (struct AddressSolverInformation);
asi->network = net;
asi->calculated_quota_in_NBO = 0;
asi->calculated_quota_out_NBO = 0;