]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix double free in unbound-host, reported by Steve Grubb.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 8 Nov 2011 15:41:21 +0000 (15:41 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 8 Nov 2011 15:41:21 +0000 (15:41 +0000)
git-svn-id: file:///svn/unbound/trunk@2541 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
smallapp/unbound-host.c

index 5e7930d6339eeafdb1948cf87c0130a8135c7569..a38cf4531a0c68203dff7dfccfb899fdb04f0d65 100644 (file)
@@ -1,6 +1,7 @@
 8 November 2011: Wouter
        - can configure ssl service to one port number, and not on others.
        - fixup windows compile with ssl support.
+       - Fix double free in unbound-host, reported by Steve Grubb.
 
 1 November 2011: Wouter
        - dns over ssl support as a client, ssl-upstream yes turns it on.
index 8b96c3576c1e9dbd8c88c337445095edc56d128f..095396749ff114e57aec582cb142ebfe6caef802 100644 (file)
@@ -255,9 +255,10 @@ print_rd(int t, char* data, size_t len)
        ldns_rr_set_owner(rr, NULL);
        status = ldns_wire2rdf(rr, rd, len+2, &pos);
        if(status != LDNS_STATUS_OK) {
-       
                free(rd);
+               ldns_rr_free(rr);
                printf("error_printing_data");
+               return;
        }
        for(i=0; i<ldns_rr_rd_count(rr); i++) {
                printf(" ");