From 451c121dd54b07e5617c01d1282bcad8e1526205 Mon Sep 17 00:00:00 2001 From: rlar Date: Wed, 7 Nov 2012 19:38:28 +0100 Subject: [PATCH] improve commit `variable.c: add strict error handling' --- src/frontend/variable.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/frontend/variable.c b/src/frontend/variable.c index e12b8968f..683f8faee 100644 --- a/src/frontend/variable.c +++ b/src/frontend/variable.c @@ -303,8 +303,7 @@ cp_setparse(wordlist *wl) tfree(name); /*DG: cp_unquote Memory leak*/ if (ft_stricterror) controlled_exit(EXIT_BAD); - else - return (NULL); + return (NULL); } val = wl->wl_word; wl = wl->wl_next; @@ -320,8 +319,7 @@ cp_setparse(wordlist *wl) tfree(name); /*DG: cp_unquote Memory leak: free name before exiting*/ if (ft_stricterror) controlled_exit(EXIT_BAD); - else - return (NULL); + return (NULL); } else { val = wl->wl_word; wl = wl->wl_next; @@ -332,8 +330,7 @@ cp_setparse(wordlist *wl) tfree(name); /*DG: cp_unquote Memory leak: free name befor exiting */ if (ft_stricterror) controlled_exit(EXIT_BAD); - else - return (NULL); + return (NULL); } /* val = cp_unquote(val); DG: bad old val is lost*/ @@ -378,8 +375,7 @@ cp_setparse(wordlist *wl) tfree(name); /* va: cp_unquote memory leak: free name before exiting */ if (ft_stricterror) controlled_exit(EXIT_BAD); - else - return (NULL); + return (NULL); } vv = alloc(struct variable);