Commit eca6faee authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

tweaks: free an option string also when it was invalid

No related merge requests found
Showing with 4 additions and 5 deletions
+4 -5
...@@ -1147,10 +1147,9 @@ void parse_rcfile(FILE *rcstream, bool syntax_only) ...@@ -1147,10 +1147,9 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
rcfile_error(N_("Requested fill size \"%s\" is invalid"), rcfile_error(N_("Requested fill size \"%s\" is invalid"),
option); option);
wrap_at = -CHARS_FROM_EOL; wrap_at = -CHARS_FROM_EOL;
} else { } else
UNSET(NO_WRAP); UNSET(NO_WRAP);
free(option); free(option);
}
} else } else
#endif #endif
#ifndef NANO_TINY #ifndef NANO_TINY
...@@ -1211,8 +1210,8 @@ void parse_rcfile(FILE *rcstream, bool syntax_only) ...@@ -1211,8 +1210,8 @@ void parse_rcfile(FILE *rcstream, bool syntax_only)
rcfile_error(N_("Requested tab size \"%s\" is invalid"), rcfile_error(N_("Requested tab size \"%s\" is invalid"),
option); option);
tabsize = -1; tabsize = -1;
} else }
free(option); free(option);
} else } else
assert(FALSE); assert(FALSE);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment