]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
- Fix use-after-free in out-of-memory handling code (thanks Jake
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 16 May 2013 07:36:37 +0000 (07:36 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Thu, 16 May 2013 07:36:37 +0000 (07:36 +0000)
  Montgomery).

git-svn-id: file:///svn/unbound/trunk@2900 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
validator/val_neg.c

index bd5397ea7604e296b62d69581b280517c140a376..9e8aff2fbe3d6e102230417866b90a5b9685bffa 100644 (file)
@@ -1,3 +1,7 @@
+16 May 2013: Wouter
+       - Fix use-after-free in out-of-memory handling code (thanks Jake
+         Montgomery).
+
 15 May 2013: Wouter
        - Fix round-robin doesn't work with some Windows clients (from Ilya
          Bakulin).
index eec2eb1b6bb75ddc5e494f2208a0a03edceb29bf..83f0df5a3f2d423b6f3574d108989519cfebab3b 100644 (file)
@@ -494,8 +494,8 @@ static struct val_neg_zone* neg_zone_chain(
                        struct val_neg_zone* p=first, *np;
                        while(p) {
                                np = p->parent;
-                               free(p);
                                free(p->name);
+                               free(p);
                                p = np;
                        }
                        return NULL;
@@ -640,8 +640,8 @@ static struct val_neg_data* neg_data_chain(
                        struct val_neg_data* p = first, *np;
                        while(p) {
                                np = p->parent;
-                               free(p);
                                free(p->name);
+                               free(p);
                                p = np;
                        }
                        return NULL;