diff --git a/src/frontend/variable.c b/src/frontend/variable.c index 5503e0128..e12b8968f 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -301,7 +301,10 @@ cp_setparse(wordlist *wl) if (wl == NULL) { fprintf(cp_err, "Error: bad set form.\n"); tfree(name); /*DG: cp_unquote Memory leak*/ - return (NULL); + if (ft_stricterror) + controlled_exit(EXIT_BAD); + else + return (NULL); } val = wl->wl_word; wl = wl->wl_next; @@ -315,7 +318,10 @@ cp_setparse(wordlist *wl) if (!wl) { fprintf(cp_err, "Error: %s equals what?.\n", name); tfree(name); /*DG: cp_unquote Memory leak: free name before exiting*/ - return (NULL); + if (ft_stricterror) + controlled_exit(EXIT_BAD); + else + return (NULL); } else { val = wl->wl_word; wl = wl->wl_next; @@ -324,7 +330,10 @@ cp_setparse(wordlist *wl) } else { fprintf(cp_err, "Error: bad set form.\n"); tfree(name); /*DG: cp_unquote Memory leak: free name befor exiting */ - return (NULL); + if (ft_stricterror) + controlled_exit(EXIT_BAD); + else + return (NULL); } /* val = cp_unquote(val); DG: bad old val is lost*/ @@ -367,7 +376,10 @@ cp_setparse(wordlist *wl) if (balance && !wl) { fprintf(cp_err, "Error: bad set form.\n"); tfree(name); /* va: cp_unquote memory leak: free name before exiting */ - return (NULL); + if (ft_stricterror) + controlled_exit(EXIT_BAD); + else + return (NULL); } vv = alloc(struct variable);