commit eca6faee5bccdd8058455020bd7445038226f4aa
parent 59edef55dcc6d2e5a427e97f4ef93aeece920011
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Wed, 11 Jan 2017 09:49:24 +0100
tweaks: free an option string also when it was invalid
Diffstat:
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/src/rcfile.c b/src/rcfile.c
@@ -1147,10 +1147,9 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
rcfile_error(N_("Requested fill size \"%s\" is invalid"),
option);
wrap_at = -CHARS_FROM_EOL;
- } else {
+ } else
UNSET(NO_WRAP);
- free(option);
- }
+ free(option);
} else
#endif
#ifndef NANO_TINY
@@ -1211,8 +1210,8 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
rcfile_error(N_("Requested tab size \"%s\" is invalid"),
option);
tabsize = -1;
- } else
- free(option);
+ }
+ free(option);
} else
assert(FALSE);
}