}
ret = zone_update_add(zone->control_update, rrset);
- knot_rrset_free(&rrset, NULL);
+ knot_rrset_free(rrset, NULL);
return ret;
}
}
ret = zone_update_remove(zone->control_update, rrset);
- knot_rrset_free(&rrset, NULL);
+ knot_rrset_free(rrset, NULL);
return ret;
} else {
uint8_t owner[KNOT_DNAME_MAXLEN];
-/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
knot_rrset_t *old_nsec_lc = knot_rrset_copy(&old_nsec, NULL);
ret = knot_rrset_rr_to_canonical(old_nsec_lc);
if (ret != KNOT_EOK) {
- knot_rrset_free(&old_nsec_lc, NULL);
+ knot_rrset_free(old_nsec_lc, NULL);
return ret;
}
bool equal = knot_rrset_equal(&new_nsec, old_nsec_lc,
KNOT_RRSET_COMPARE_WHOLE);
- knot_rrset_free(&old_nsec_lc, NULL);
+ knot_rrset_free(old_nsec_lc, NULL);
if (equal) {
// current NSEC is valid, do nothing
// connect the copied rrset
int ret = connect_nsec3_base(&acopy->rrs, b->owner);
if (ret != KNOT_EOK || knot_rrset_equal(&aorig, acopy, KNOT_RRSET_COMPARE_WHOLE)) {
- knot_rrset_free(&acopy, NULL);
+ knot_rrset_free(acopy, NULL);
return ret;
}
if (ret == KNOT_EOK) {
ret = changeset_add_addition(data->changeset, acopy, CHANGESET_CHECK | CHANGESET_CHECK_CANCELOUT);
}
- knot_rrset_free(&acopy, NULL);
+ knot_rrset_free(acopy, NULL);
return ret;
}
int r = set_nsec3param(rrset, params);
if (r != KNOT_EOK) {
- knot_rrset_free(&rrset, NULL);
+ knot_rrset_free(rrset, NULL);
return r;
}
r = changeset_add_addition(changeset, rrset, 0);
- knot_rrset_free(&rrset, NULL);
+ knot_rrset_free(rrset, NULL);
return r;
}
#undef CHECK_RET
cleanup:
- knot_rrset_free(&add_dnskeys, NULL);
- knot_rrset_free(&add_cdnskeys, NULL);
- knot_rrset_free(&add_cdss, NULL);
+ knot_rrset_free(add_dnskeys, NULL);
+ knot_rrset_free(add_cdnskeys, NULL);
+ knot_rrset_free(add_cdss, NULL);
changeset_clear(&ch);
return ret;
}
// Process saved SOA if fallback from IXFR
if (data->initial_soa_copy != NULL) {
next = axfr_consume_rr(data->initial_soa_copy, data);
- knot_rrset_free(&data->initial_soa_copy, data->mm);
+ knot_rrset_free(data->initial_soa_copy, data->mm);
if (next != KNOT_STATE_CONSUME) {
return next;
}
return;
}
- knot_rrset_free(&data->ixfr.final_soa, data->mm);
+ knot_rrset_free(data->ixfr.final_soa, data->mm);
mm_free(data->mm, data->ixfr.proc);
data->ixfr.proc = NULL;
// Process saved SOA if existing
if (data->initial_soa_copy != NULL) {
next = ixfr_consume_rr(data->initial_soa_copy, data);
- knot_rrset_free(&data->initial_soa_copy, data->mm);
+ knot_rrset_free(data->initial_soa_copy, data->mm);
if (next != KNOT_STATE_CONSUME) {
return next;
}
uint32_t master_serial;
int ret = zone_get_master_serial(data->zone, &master_serial);
if (sending_soa == NULL || ret != KNOT_EOK) {
- knot_rrset_free(&sending_soa, data->mm);
+ knot_rrset_free(sending_soa, data->mm);
return KNOT_STATE_FAIL;
}
knot_soa_serial_set(&sending_soa->rrs, master_serial);
knot_pkt_begin(pkt, KNOT_AUTHORITY);
knot_pkt_put(pkt, KNOT_COMPR_HINT_QNAME, sending_soa, 0);
- knot_rrset_free(&sending_soa, data->mm);
+ knot_rrset_free(sending_soa, data->mm);
}
query_put_edns(pkt, &data->edns);
knot_dname_t *next = online_nsec_next(nsec_owner, knotd_qdata_zone_name(qdata));
if (!next) {
- knot_rrset_free(&nsec, mm);
+ knot_rrset_free(nsec, mm);
return NULL;
}
dnssec_nsec_bitmap_t *bitmap = synth_bitmap(pkt, qdata, !is_deleg(pkt));
if (!bitmap) {
free(next);
- knot_rrset_free(&nsec, mm);
+ knot_rrset_free(nsec, mm);
return NULL;
}
dnssec_nsec_bitmap_free(bitmap);
if (knot_rrset_add_rdata(nsec, rdata, size, mm) != KNOT_EOK) {
- knot_rrset_free(&nsec, mm);
+ knot_rrset_free(nsec, mm);
return NULL;
}
}
if (knot_rdataset_copy(©->rrs, &cover->rrs, NULL) != KNOT_EOK) {
- knot_rrset_free(©, NULL);
+ knot_rrset_free(copy, NULL);
return NULL;
}
knot_rrset_t *rrsig = knot_rrset_new(owner, KNOT_RRTYPE_RRSIG, copy->rclass,
copy->ttl, mm);
if (!rrsig) {
- knot_rrset_free(©, NULL);
+ knot_rrset_free(copy, NULL);
return NULL;
}
int ret = knot_sign_rrset(rrsig, copy, kkey->key, kkey->ctx, &module_ctx->kctx, mm);
if (ret != KNOT_EOK) {
- knot_rrset_free(©, NULL);
- knot_rrset_free(&rrsig, mm);
+ knot_rrset_free(copy, NULL);
+ knot_rrset_free(rrsig, mm);
return NULL;
}
}
- knot_rrset_free(©, NULL);
+ knot_rrset_free(copy, NULL);
return rrsig;
}
int r = knot_pkt_put(pkt, KNOT_COMPR_HINT_NONE, rrsig, KNOT_PF_FREE);
if (r != KNOT_EOK) {
- knot_rrset_free(&rrsig, &pkt->mm);
+ knot_rrset_free(rrsig, &pkt->mm);
state = KNOTD_IN_STATE_ERROR;
break;
}
knot_rrset_t *nsec = synth_nsec(pkt, qdata, &pkt->mm);
int r = knot_pkt_put(pkt, KNOT_COMPR_HINT_NONE, nsec, KNOT_PF_FREE);
if (r != DNSSEC_EOK) {
- knot_rrset_free(&nsec, &pkt->mm);
+ knot_rrset_free(nsec, &pkt->mm);
return KNOTD_IN_STATE_ERROR;
}
}
int r = knot_rrset_add_rdata(dnskey, rdata.data, rdata.size, mm);
if (r != KNOT_EOK) {
- knot_rrset_free(&dnskey, mm);
+ knot_rrset_free(dnskey, mm);
return NULL;
}
}
dnssec_binary_t rdata = { 0 };
zone_key_t *key = ksk_for_cds(ctx);
if (key == NULL) {
- knot_rrset_free(&dnskey, mm);
+ knot_rrset_free(dnskey, mm);
return NULL;
}
dnssec_key_get_rdata(key->key, &rdata);
int ret = knot_rrset_add_rdata(dnskey, rdata.data, rdata.size, mm);
if (ret != KNOT_EOK) {
- knot_rrset_free(&dnskey, mm);
+ knot_rrset_free(dnskey, mm);
return NULL;
}
dnssec_binary_t rdata = { 0 };
zone_key_t *key = ksk_for_cds(ctx);
if (key == NULL) {
- knot_rrset_free(&ds, mm);
+ knot_rrset_free(ds, mm);
return NULL;
}
zone_key_calculate_ds(key, &rdata);
int ret = knot_rrset_add_rdata(ds, rdata.data, rdata.size, mm);
if (ret != KNOT_EOK) {
- knot_rrset_free(&ds, mm);
+ knot_rrset_free(ds, mm);
return NULL;
}
int r = knot_pkt_put(pkt, KNOT_COMPR_HINT_QNAME, dnskey, KNOT_PF_FREE);
if (r != DNSSEC_EOK) {
- knot_rrset_free(&dnskey, &pkt->mm);
+ knot_rrset_free(dnskey, &pkt->mm);
return KNOTD_IN_STATE_ERROR;
}
state = KNOTD_IN_STATE_HIT;
int r = knot_pkt_put(pkt, KNOT_COMPR_HINT_QNAME, dnskey, KNOT_PF_FREE);
if (r != DNSSEC_EOK) {
- knot_rrset_free(&dnskey, &pkt->mm);
+ knot_rrset_free(dnskey, &pkt->mm);
return KNOTD_IN_STATE_ERROR;
}
state = KNOTD_IN_STATE_HIT;
int r = knot_pkt_put(pkt, KNOT_COMPR_HINT_QNAME, ds, KNOT_PF_FREE);
if (r != DNSSEC_EOK) {
- knot_rrset_free(&ds, &pkt->mm);
+ knot_rrset_free(ds, &pkt->mm);
return KNOTD_IN_STATE_ERROR;
}
state = KNOTD_IN_STATE_HIT;
int r = knot_pkt_put(pkt, KNOT_COMPR_HINT_QNAME, nsec, KNOT_PF_FREE);
if (r != DNSSEC_EOK) {
- knot_rrset_free(&nsec, &pkt->mm);
+ knot_rrset_free(nsec, &pkt->mm);
return KNOTD_IN_STATE_ERROR;
}
-/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
if (ret != KNOT_EOK) {
- knot_rrset_free(&rr, &pkt->mm);
+ knot_rrset_free(rr, &pkt->mm);
return NULL;
}
/* Record data is the query source address. */
int ret = knot_rrset_add_rdata(rrset, rdata, len_rdata, &pkt->mm);
if (ret != KNOT_EOK) {
- knot_rrset_free(&rrset, &pkt->mm);
+ knot_rrset_free(rrset, &pkt->mm);
return KNOTD_IN_STATE_ERROR;
}
/* Add the new RRset to the response packet. */
ret = knot_pkt_put(pkt, KNOT_COMPR_HINT_QNAME, rrset, KNOT_PF_FREE);
if (ret != KNOT_EOK) {
- knot_rrset_free(&rrset, &pkt->mm);
+ knot_rrset_free(rrset, &pkt->mm);
return KNOTD_IN_STATE_ERROR;
}
-/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
assert(rrset);
if (*soa != NULL) {
- knot_rrset_free(soa, NULL);
+ knot_rrset_free(*soa, NULL);
}
*soa = knot_rrset_copy(rrset, NULL);
int ret = knot_rrset_empty(to_add) ? KNOT_EOK : add_rr_to_contents(ch->add, to_add);
if (flags & CHANGESET_CHECK) {
- knot_rrset_free((knot_rrset_t **)&rrset, NULL);
+ knot_rrset_free((knot_rrset_t *)rrset, NULL);
}
- knot_rrset_free(&rrset_cancelout, NULL);
+ knot_rrset_free(rrset_cancelout, NULL);
return ret;
}
int ret = knot_rrset_empty(to_remove) ? KNOT_EOK : add_rr_to_contents(ch->remove, to_remove);
if (flags & CHANGESET_CHECK) {
- knot_rrset_free((knot_rrset_t **)&rrset, NULL);
+ knot_rrset_free((knot_rrset_t *)rrset, NULL);
}
- knot_rrset_free(&rrset_cancelout, NULL);
+ knot_rrset_free(rrset_cancelout, NULL);
return ret;
}
if (rrset->type == KNOT_RRTYPE_SOA) {
/* Do not add SOAs into actual contents. */
if (ch->soa_to != NULL) {
- knot_rrset_free(&ch->soa_to, NULL);
+ knot_rrset_free(ch->soa_to, NULL);
ch->soa_to = NULL;
}
return KNOT_EOK;
if (rrset->type == KNOT_RRTYPE_SOA) {
/* Do not add SOAs into actual contents. */
if (ch->soa_from != NULL) {
- knot_rrset_free(&ch->soa_from, NULL);
+ knot_rrset_free(ch->soa_from, NULL);
ch->soa_from = NULL;
}
return KNOT_EOK;
if (soa_copy == NULL && ch2->soa_to) {
return KNOT_ENOMEM;
}
- knot_rrset_free(&ch1->soa_to, NULL);
+ knot_rrset_free(ch1->soa_to, NULL);
ch1->soa_to = soa_copy;
return KNOT_EOK;
}
}
- knot_rrset_free(&fixrrset, ctx->mm);
+ knot_rrset_free(fixrrset, ctx->mm);
return ret;
}
*out = ch->add;
int ret = add_rr_to_contents(*out, ch->soa_to);
- knot_rrset_free(&ch->soa_to, NULL);
+ knot_rrset_free(ch->soa_to, NULL);
if (ret != KNOT_EOK) {
zone_contents_deep_free(out);
}
update_free_zone(&ch->add);
zone_contents_deep_free(&ch->remove);
- knot_rrset_free(&ch->soa_from, NULL);
- knot_rrset_free(&ch->soa_to, NULL);
+ knot_rrset_free(ch->soa_from, NULL);
+ knot_rrset_free(ch->soa_to, NULL);
free(ch->data);
free(ch);
}
zone_contents_deep_free(&ch->add);
zone_contents_deep_free(&ch->remove);
- knot_rrset_free(&ch->soa_from, NULL);
- knot_rrset_free(&ch->soa_to, NULL);
+ knot_rrset_free(ch->soa_from, NULL);
+ knot_rrset_free(ch->soa_to, NULL);
+ ch->soa_from = NULL;
+ ch->soa_to = NULL;
// Delete binary data
free(ch->data);
-/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
WALK_LIST_DELSAFE(n, nxt, *l) {
ptrnode_t *ptr_n = (ptrnode_t *)n;
knot_rrset_t *rrset = (knot_rrset_t *)ptr_n->d;
- knot_rrset_free(&rrset, NULL);
+ knot_rrset_free(rrset, NULL);
free(n);
};
}
zone_node_t *n = NULL;
knot_rrset_t *rrs_copy = knot_rrset_copy(rrset, &update->mm);
int ret = zone_contents_remove_rr(update->new_cont, rrs_copy, &n);
- knot_rrset_free(&rrs_copy, &update->mm);
+ knot_rrset_free(rrs_copy, &update->mm);
return ret;
} else {
return KNOT_EINVAL;
int ret = zone_update_remove(update, soa_cpy);
if (ret != KNOT_EOK) {
- knot_rrset_free(&soa_cpy, NULL);
+ knot_rrset_free(soa_cpy, NULL);
}
uint32_t old_serial = knot_soa_serial(&soa_cpy->rrs);
knot_soa_serial_set(&soa_cpy->rrs, new_serial);
ret = zone_update_add(update, soa_cpy);
- knot_rrset_free(&soa_cpy, NULL);
+ knot_rrset_free(soa_cpy, NULL);
return ret;
}
-/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
}
changeset->soa_to = knot_rrset_copy(&soa_rrset2, NULL);
if (changeset->soa_to == NULL) {
- knot_rrset_free(&changeset->soa_from, NULL);
+ knot_rrset_free(changeset->soa_from, NULL);
return KNOT_ENOMEM;
}
int ret = knot_rdataset_copy(&rrset->rrs, &src->rrs, mm);
if (ret != KNOT_EOK) {
- knot_rrset_free(&rrset, mm);
+ knot_rrset_free(rrset, mm);
return NULL;
}
}
_public_
-void knot_rrset_free(knot_rrset_t **rrset, knot_mm_t *mm)
+void knot_rrset_free(knot_rrset_t *rrset, knot_mm_t *mm)
{
- if (rrset == NULL || *rrset == NULL) {
+ if (rrset == NULL) {
return;
}
- knot_rrset_clear(*rrset, mm);
-
- mm_free(mm, *rrset);
- *rrset = NULL;
+ knot_rrset_clear(rrset, mm);
+ mm_free(mm, rrset);
}
_public_
/*!
* \brief Destroys the RRSet structure and all its substructures.
- )
- * Also sets the given pointer to NULL.
*
* \param rrset RRset to be destroyed.
* \param mm Memory context.
*/
-void knot_rrset_free(knot_rrset_t **rrset, knot_mm_t *mm);
+void knot_rrset_free(knot_rrset_t *rrset, knot_mm_t *mm);
/*!
* \brief Frees structures inside RRSet, but not the RRSet itself.
request_mac, request_mac_len,
digest_tmp, &digest_tmp_len, tmp_tsig, key);
if (ret != KNOT_EOK) {
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
return ret;
}
msg_max_len - *msg_len, NULL);
if (ret < 0) {
*digest_len = 0;
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
return ret;
}
size_t tsig_wire_len = ret;
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
*msg_len += tsig_wire_len;
size_t wire_len = prev_digest_len + to_sign_len + KNOT_TSIG_TIMERS_LENGTH + 2;
uint8_t *wire = malloc(wire_len);
if (!wire) {
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
return KNOT_ENOMEM;
}
memset(wire, 0, wire_len);
int ret = compute_digest(wire, wire_len, digest_tmp, &digest_tmp_len, key);
free(wire);
if (ret != KNOT_EOK) {
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
*digest_len = 0;
return ret;
}
if (digest_tmp_len > *digest_len) {
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
*digest_len = 0;
return KNOT_ESPACE;
}
ret = knot_rrset_to_wire(tmp_tsig, msg + *msg_len,
msg_max_len - *msg_len, NULL);
if (ret < 0) {
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
*digest_len = 0;
return ret;
}
size_t tsig_wire_size = ret;
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
*msg_len += tsig_wire_size;
uint16_t arcount = knot_wire_get_arcount(msg);
int ret = knot_tsig_append(msg, msg_len, msg_max_len, tmp_tsig);
/* key_name already referenced in RRSet, no need to free separately. */
- knot_rrset_free(&tmp_tsig, NULL);
+ knot_rrset_free(tmp_tsig, NULL);
return ret;
}
-/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
printf("%s\n", buf);
- knot_rrset_free(&question, NULL);
+ knot_rrset_free(question, NULL);
free(buf);
}
// Fill in blank SOA rdata to rrset.
ret = knot_rrset_add_rdata(soa, wire, sizeof(wire), &packet->mm);
if (ret != KNOT_EOK) {
- knot_rrset_free(&soa, &packet->mm);
+ knot_rrset_free(soa, &packet->mm);
knot_pkt_free(packet);
return NULL;
}
ret = knot_pkt_put(packet, KNOT_COMPR_HINT_NONE, soa, KNOT_PF_FREE);
if (ret != KNOT_EOK) {
- knot_rrset_free(&soa, &packet->mm);
+ knot_rrset_free(soa, &packet->mm);
knot_pkt_free(packet);
return NULL;
}
if (ret != KNOT_EOK) {
DBG("%s: failed to set rrset from wire (%s)\n",
__func__, knot_strerror(ret));
- knot_rrset_free(&rr, NULL);
+ knot_rrset_free(rr, NULL);
return ret;
}
if (ptrlist_add(target_list, rr, mm) == NULL) {
- knot_rrset_free(&rr, NULL);
+ knot_rrset_free(rr, NULL);
return KNOT_ENOMEM;
}
ptrnode_t *node = NULL;
WALK_LIST(node, *list) {
knot_rrset_t *rrset = (knot_rrset_t *)node->d;
- knot_rrset_free(&rrset, NULL);
+ knot_rrset_free(rrset, NULL);
}
ptrlist_free(list, mm);
}
/* Free extra data. */
for (unsigned i = 0; i < NAMECOUNT; ++i) {
- knot_rrset_free(&rrsets[i], NULL);
+ knot_rrset_free(rrsets[i], NULL);
}
free(tsig_key.secret.data);
mp_delete((struct mempool *)mm.ctx);
int main(int argc, char *argv[])
{
- plan(19);
+ plan_lazy();
// Test new
knot_dname_t *dummy_owner = knot_dname_from_str_alloc("test.");
ok(check_rrset(rrset, NULL, 0, KNOT_CLASS_IN, 0), "rrset: init empty.");
// "Test" freeing
- knot_rrset_free(&rrset, NULL);
- knot_rrset_free(©, NULL);
- ok(rrset == NULL && copy == NULL, "rrset: free.");
+ knot_rrset_free(rrset, NULL);
+ knot_rrset_free(copy, NULL);
return 0;
}
ok(changeset_empty(ch2), "changeset: clear list");
free(ch2);
- knot_rrset_free(&apex_txt_rr, NULL);
- knot_rrset_free(&apex_spf_rr, NULL);
- knot_rrset_free(&other_rr, NULL);
+ knot_rrset_free(apex_txt_rr, NULL);
+ knot_rrset_free(apex_spf_rr, NULL);
+ knot_rrset_free(other_rr, NULL);
return 0;
}
knot_rrset_t soa;
init_soa(&soa, from, apex);
- knot_rrset_free(&ch->soa_from, NULL);
+ knot_rrset_free(ch->soa_from, NULL);
ch->soa_from = knot_rrset_copy(&soa, NULL);
assert(ch->soa_from);
knot_rrset_clear(&soa, NULL);
init_soa(&soa, to, apex);
- knot_rrset_free(&ch->soa_to, NULL);
+ knot_rrset_free(ch->soa_to, NULL);
ch->soa_to = knot_rrset_copy(&soa, NULL);
assert(ch->soa_to);
knot_rrset_clear(&soa, NULL);
static knot_rrset_t * rrsC = NULL;
if (apex == NULL) {
- knot_rrset_free(&rrsA, NULL);
- knot_rrset_free(&rrsB, NULL);
- knot_rrset_free(&rrsC, NULL);
+ knot_rrset_free(rrsA, NULL);
+ knot_rrset_free(rrsB, NULL);
+ knot_rrset_free(rrsC, NULL);
rrsA = rrsB = rrsC = NULL;
return NULL;
}
ok(n_rrset && knot_rrset_equal(n_rrset, dummy_rrset, KNOT_RRSET_COMPARE_WHOLE),
"Node: create existing RRSet.");
- knot_rrset_free(&n_rrset, NULL);
+ knot_rrset_free(n_rrset, NULL);
n_rrset = node_create_rrset(node, KNOT_RRTYPE_SOA);
ok(n_rrset == NULL, "Node: create non-existing RRSet.");
ok(ret == KNOT_ETTL && node->rrset_count == 1,
"Node: add RRSet, TTL mismatch.");
- knot_rrset_free(&dummy_rrset, NULL);
+ knot_rrset_free(dummy_rrset, NULL);
// Test bool functions
ok(node_rrtype_exists(node, KNOT_RRTYPE_TXT), "Node: type exists.");
ok(node_rrtype_is_signed(node, KNOT_RRTYPE_TXT), "Node: type is signed.");
- knot_rrset_free(&dummy_rrset, NULL);
+ knot_rrset_free(dummy_rrset, NULL);
// Test remove RRset
node_remove_rdataset(node, KNOT_RRTYPE_AAAA);
-/* Copyright (C) 2017 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
+/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
7200, mm);
knot_rrset_add_rdata(soa, SOA_RDATA, SOA_RDLEN, mm);
node_add_rrset(root->contents->apex, soa, NULL);
- knot_rrset_free(&soa, mm);
+ knot_rrset_free(soa, mm);
/* Bake the zone. */
zone_contents_adjust_full(root->contents);