summaryrefslogtreecommitdiffstats
path: root/contrib/bind/bin/named/ns_parser.y
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/bind/bin/named/ns_parser.y')
-rw-r--r--contrib/bind/bin/named/ns_parser.y21
1 files changed, 17 insertions, 4 deletions
diff --git a/contrib/bind/bin/named/ns_parser.y b/contrib/bind/bin/named/ns_parser.y
index 680a586..ed49549 100644
--- a/contrib/bind/bin/named/ns_parser.y
+++ b/contrib/bind/bin/named/ns_parser.y
@@ -1,6 +1,6 @@
%{
#if !defined(lint) && !defined(SABER)
-static char rcsid[] = "$Id: ns_parser.y,v 8.63 2000/12/23 08:14:41 vixie Exp $";
+static char rcsid[] = "$Id: ns_parser.y,v 8.63.2.4 2001/04/30 08:03:02 marka Exp $";
#endif /* not lint */
/*
@@ -265,7 +265,11 @@ statement: include_stmt
| error L_END_INCLUDE
;
-include_stmt: T_INCLUDE L_QSTRING L_EOS { lexer_begin_file($2, NULL); }
+include_stmt: T_INCLUDE L_QSTRING L_EOS
+ {
+ lexer_begin_file($2, NULL);
+ freestr($2);
+ }
;
/*
@@ -601,6 +605,7 @@ control: /* Empty */
#ifndef NO_SOCKADDR_UN
ns_ctl_add(&current_controls, ns_ctl_new_unix($2, $4, $6, $8));
#endif
+ freestr($2);
}
| error
;
@@ -1273,6 +1278,7 @@ address_match_element: address_match_simple
}
else
$$ = new_ip_match_key(dst_key);
+ (void)freestr(key_name);
}
;
@@ -1399,13 +1405,11 @@ key_stmt: T_SEC_KEY
$3);
} else if (lookup_key(key_name) != NULL) {
parser_error(0, "can't redefine key '%s'", key_name);
- freestr(key_name);
} else {
if (current_algorithm == NULL ||
current_secret == NULL) {
parser_error(0, "skipping bad key '%s'",
key_name);
- freestr(key_name);
} else {
dst_key = new_key_info(key_name,
current_algorithm,
@@ -1420,6 +1424,15 @@ key_stmt: T_SEC_KEY
}
}
}
+ if (key_name != NULL)
+ freestr(key_name);
+ key_name = NULL;
+ if (current_algorithm != NULL)
+ freestr(current_algorithm);
+ current_algorithm = NULL;
+ if (current_secret != NULL)
+ freestr(current_secret);
+ current_secret = NULL;
freestr($3);
}
;
OpenPOWER on IntegriCloud