Other obviously bad, allocations
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 23 Jun 2014 15:50:42 +0000 (16:50 +0100)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 23 Jun 2014 15:50:42 +0000 (16:50 +0100)
src/modules/rlm_cache/rlm_cache.c
src/modules/rlm_radutmp/rlm_radutmp.c

index 2bd82f4..353d4a1 100644 (file)
@@ -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;
 
index 6fe71ba..ba8d1d3 100644 (file)
@@ -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;