mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-09-26 11:44:53 +02:00
no double free.
git-svn-id: file:///svn/unbound/trunk@2627 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
+4
-10
@@ -1480,9 +1480,8 @@ do_forward_add(SSL* ssl, struct worker* worker, char* args)
|
||||
int insecure = 0;
|
||||
uint8_t* nm = NULL;
|
||||
struct delegpt* dp = NULL;
|
||||
if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, NULL)) {
|
||||
if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, NULL))
|
||||
return;
|
||||
}
|
||||
if(insecure) {
|
||||
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
|
||||
nm)) {
|
||||
@@ -1509,10 +1508,8 @@ do_forward_remove(SSL* ssl, struct worker* worker, char* args)
|
||||
struct iter_forwards* fwd = worker->env.fwds;
|
||||
int insecure = 0;
|
||||
uint8_t* nm = NULL;
|
||||
if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL)) {
|
||||
free(nm);
|
||||
if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL))
|
||||
return;
|
||||
}
|
||||
if(insecure)
|
||||
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
|
||||
nm);
|
||||
@@ -1542,9 +1539,8 @@ do_stub_add(SSL* ssl, struct worker* worker, char* args)
|
||||
int insecure = 0, prime = 0;
|
||||
uint8_t* nm = NULL;
|
||||
struct delegpt* dp = NULL;
|
||||
if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, &prime)) {
|
||||
if(!parse_fs_args(ssl, args, &nm, &dp, &insecure, &prime))
|
||||
return;
|
||||
}
|
||||
if(insecure) {
|
||||
if(!anchors_add_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
|
||||
nm)) {
|
||||
@@ -1583,10 +1579,8 @@ do_stub_remove(SSL* ssl, struct worker* worker, char* args)
|
||||
struct iter_hints* hints = get_iter_hints(worker);
|
||||
int insecure = 0;
|
||||
uint8_t* nm = NULL;
|
||||
if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL)) {
|
||||
free(nm);
|
||||
if(!parse_fs_args(ssl, args, &nm, NULL, &insecure, NULL))
|
||||
return;
|
||||
}
|
||||
if(insecure)
|
||||
anchors_delete_insecure(worker->env.anchors, LDNS_RR_CLASS_IN,
|
||||
nm);
|
||||
|
||||
Reference in New Issue
Block a user