summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorru <ru@FreeBSD.org>2003-02-21 23:17:00 +0000
committerru <ru@FreeBSD.org>2003-02-21 23:17:00 +0000
commit97991902a7d5f09e28917a66dcb2e7b7830c3768 (patch)
tree79983d65cc825fdafdd5d9e9482398b6f1d24be4 /usr.sbin
parent6c37da8876d509d7fe76859f5c68c6cec636be90 (diff)
downloadFreeBSD-src-97991902a7d5f09e28917a66dcb2e7b7830c3768.zip
FreeBSD-src-97991902a7d5f09e28917a66dcb2e7b7830c3768.tar.gz
Allow for boolean make options (``makeoptions NO_MODULES'').
Fixed the potential bug in rmopt().
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/config/config.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/config/config.y b/usr.sbin/config/config.y
index aa8a40a..c95ede9 100644
--- a/usr.sbin/config/config.y
+++ b/usr.sbin/config/config.y
@@ -220,6 +220,8 @@ Mkopt_list:
;
Mkoption:
+ Save_id
+ = { newopt(&mkopt, $1, ns("")); } |
Save_id EQUALS Opt_value
= { newopt(&mkopt, $1, $3); } ;
@@ -320,7 +322,8 @@ rmopt(struct opt_head *list, char *name)
op = SLIST_NEXT(op, op_next);
SLIST_REMOVE(list, rmop, opt, op_next);
free(rmop->op_name);
- free(rmop->op_value);
+ if (rmop->op_value != NULL)
+ free(rmop->op_value);
free(rmop);
if (op == NULL)
break;
OpenPOWER on IntegriCloud