From: Jelte Jansen Date: Tue, 30 Jun 2009 13:57:28 +0000 (+0000) Subject: patches from Marius Rieder, thanks! X-Git-Tag: release-1.6.0~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=29bfa45a4d024a84273089cd76a32c6a443e9ec8;p=thirdparty%2Fldns.git patches from Marius Rieder, thanks! --- diff --git a/rr.c b/rr.c index 69f29635..4a0722c0 100644 --- a/rr.c +++ b/rr.c @@ -935,6 +935,7 @@ ldns_rr_list_subtype_by_rdf(ldns_rr_list *l, ldns_rdf *r, size_t pos) pos); if (!list_rdf) { /* pos is too large or any other error */ + ldns_rr_list_deep_free(subtyped); return NULL; } @@ -948,6 +949,7 @@ ldns_rr_list_subtype_by_rdf(ldns_rr_list *l, ldns_rdf *r, size_t pos) if (ldns_rr_list_rr_count(subtyped) > 0) { return subtyped; } else { + ldns_rr_list_free(subtyped); return NULL; } } @@ -1265,7 +1267,7 @@ ldns_rr_list_clone(const ldns_rr_list *rrlist) ); if (!r) { /* huh, failure in cloning */ - ldns_rr_list_free(new_list); + ldns_rr_list_deep_free(new_list); return NULL; } ldns_rr_list_push_rr(new_list, r);