From: Arran Cudbard-Bell Date: Mon, 23 Jun 2014 15:50:42 +0000 (+0100) Subject: Other obviously bad, allocations X-Git-Tag: release_3_0_4_rc2~224 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=freeradius.git;a=commitdiff_plain;h=59ab5d80a07bd0a5bd94442e3053b96f610c0bf3 Other obviously bad, allocations --- diff --git a/src/modules/rlm_cache/rlm_cache.c b/src/modules/rlm_cache/rlm_cache.c index 2bd82f4..353d4a1 100644 --- a/src/modules/rlm_cache/rlm_cache.c +++ b/src/modules/rlm_cache/rlm_cache.c @@ -292,7 +292,7 @@ static rlm_cache_entry_t *cache_add(rlm_cache_t *inst, REQUEST *request, char co vp = pairfind(request->config_items, PW_CACHE_TTL, 0, TAG_ANY); if (vp && (vp->vp_signed == 0)) return NULL; - c = talloc_zero(inst, rlm_cache_entry_t); + c = talloc_zero(NULL, rlm_cache_entry_t); c->key = talloc_typed_strdup(c, key); c->created = c->expires = request->timestamp; diff --git a/src/modules/rlm_radutmp/rlm_radutmp.c b/src/modules/rlm_radutmp/rlm_radutmp.c index 6fe71ba..ba8d1d3 100644 --- a/src/modules/rlm_radutmp/rlm_radutmp.c +++ b/src/modules/rlm_radutmp/rlm_radutmp.c @@ -484,7 +484,7 @@ static rlm_rcode_t CC_HINT(nonnull) mod_accounting(void *instance, REQUEST *requ * easier than searching through the entire file. */ if (!cache) { - cache = talloc_zero(inst, NAS_PORT); + cache = talloc_zero(NULL, NAS_PORT); if (cache) { cache->nasaddr = ut.nas_address; cache->port = ut.nas_port;