}
}
-
void autr_point_delete(struct trust_anchor* tp)
{
if(!tp)
if(!ta)
return NULL;
*tp = find_add_tp(anchors, rr);
+ if(!*tp) {
+ ldns_rr_free(ta->rr);
+ free(ta);
+ return NULL;
+ }
/* add ta to tp */
ta->next = (*tp)->autr->keys;
(*tp)->autr->keys = ta;
struct trust_anchor** tp)
{
ldns_rr* rr;
- struct autr_ta* ta = NULL;
ldns_status lstatus;
if (!str_contains_data(str, ';'))
return NULL; /* empty line */
ldns_get_errorstr_by_id(lstatus));
return NULL;
}
- ta = add_trustanchor_frm_rr(anchors, rr, tp);
- return ta;
+ return add_trustanchor_frm_rr(anchors, rr, tp);
}
/**