X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fats%2Fats_api_performance.c;h=90e061c1d2873e62716ff1cb183716dcac7fcb1b;hb=f1ca38573f22205e28ac482efebe463696c9c2c7;hp=390531d9fa0948c3d1db0d5b0ad8717f18c1aa40;hpb=8929c943f1f57aaf48a1bc3f6edc9939698e688b;p=oweals%2Fgnunet.git diff --git a/src/ats/ats_api_performance.c b/src/ats/ats_api_performance.c index 390531d9f..90e061c1d 100644 --- a/src/ats/ats_api_performance.c +++ b/src/ats/ats_api_performance.c @@ -628,7 +628,7 @@ GNUNET_ATS_performance_init (const struct GNUNET_CONFIGURATION_Handle *cfg, { struct GNUNET_ATS_PerformanceHandle *ph; - ph = GNUNET_malloc (sizeof (struct GNUNET_ATS_PerformanceHandle)); + ph = GNUNET_new (struct GNUNET_ATS_PerformanceHandle); ph->cfg = cfg; ph->addr_info_cb = addr_info_cb; ph->addr_info_cb_cls = addr_info_cb_cls; @@ -703,7 +703,7 @@ GNUNET_ATS_reserve_bandwidth (struct GNUNET_ATS_PerformanceHandle *ph, struct PendingMessage *p; struct ReservationRequestMessage *m; - rc = GNUNET_malloc (sizeof (struct GNUNET_ATS_ReservationContext)); + rc = GNUNET_new (struct GNUNET_ATS_ReservationContext); rc->size = amount; rc->peer = *peer; rc->rcb = rcb; @@ -763,7 +763,7 @@ GNUNET_ATS_performance_list_addresses ( if (NULL == infocb) return NULL ; - alh = GNUNET_malloc (sizeof (struct GNUNET_ATS_AddressListHandle)); + alh = GNUNET_new (struct GNUNET_ATS_AddressListHandle); alh->id = handle->id; handle->id++; alh->cb = infocb;