]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
lib/zonecut: fixed bug when materialising cache content
authorKarel Slany <karel.slany@nic.cz>
Wed, 22 Jul 2015 10:30:33 +0000 (12:30 +0200)
committerKarel Slany <karel.slany@nic.cz>
Wed, 22 Jul 2015 10:30:33 +0000 (12:30 +0200)
lib/zonecut.c

index 517b05dde918bacfaef0d325fbd5c867ecdc2549..3b6f6dd3f28125db8e8b7951123a15f95e62147f 100644 (file)
@@ -352,12 +352,12 @@ static int fetch_rrset(knot_rrset_t **rr, const knot_dname_t *owner, uint16_t ty
                return ret;
        }
 
-       *rr = knot_rrset_new(owner, type, KNOT_CLASS_IN, pool);
+       *rr = mm_alloc(pool, sizeof(knot_rrset_t));
        if (*rr == NULL) {
                return kr_error(ENOMEM);
        }
 
-       ret = kr_cache_materialize(*rr, &cached_rr, timestamp, pool);
+       ret = kr_cache_materialize(*rr, &cached_rr, drift, pool);
        if (ret != 0) {
                knot_rrset_free(rr, pool);
                return ret;