nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit e7bdfebdf476000f1f84fceba3d5630eb6b7432b
parent 4bbbb1859b118fe840f514b9819279d11370fdda
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 16 Aug 2017 21:56:56 +0200

rcfile: don't leak a shortcut when something goes wrong  [coverity scan]

Diffstat:
Msrc/rcfile.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/rcfile.c b/src/rcfile.c @@ -479,7 +479,6 @@ void parse_binding(char *ptr, bool dobind) if (!menu) { rcfile_error(N_("Function '%s' does not exist in menu '%s'"), funcptr, menuptr); - free(newsc); goto free_copy; } @@ -489,7 +488,6 @@ void parse_binding(char *ptr, bool dobind) /* Do not allow rebinding a frequent escape-sequence starter: Esc [. */ if (newsc->meta && newsc->keycode == 91) { rcfile_error(N_("Sorry, keystroke \"%s\" may not be rebound"), newsc->keystr); - free(newsc); goto free_copy; } #ifdef DEBUG @@ -525,6 +523,7 @@ void parse_binding(char *ptr, bool dobind) } free_copy: + free(newsc); free(keycopy); }