From 97991902a7d5f09e28917a66dcb2e7b7830c3768 Mon Sep 17 00:00:00 2001 From: ru Date: Fri, 21 Feb 2003 23:17:00 +0000 Subject: Allow for boolean make options (``makeoptions NO_MODULES''). Fixed the potential bug in rmopt(). --- usr.sbin/config/config.y | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'usr.sbin/config/config.y') 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; -- cgit v1.1