1
0
forked from aniani/vim

patch 7.4.1832

Problem:    Memory leak in debug commands.
Solution:   Free memory before overwriting the pointer. (hint by Justin Keyes)
This commit is contained in:
Bram Moolenaar
2016-05-17 17:45:38 +02:00
parent e40d75f6ef
commit dc303bce10
2 changed files with 3 additions and 2 deletions

View File

@@ -164,6 +164,7 @@ do_debug(char_u *cmd)
ignore_script = TRUE;
}
vim_free(cmdline);
cmdline = getcmdline_prompt('>', NULL, 0, EXPAND_NOTHING, NULL);
if (typeahead_saved)
@@ -306,8 +307,6 @@ do_debug(char_u *cmd)
(void)do_cmdline(cmdline, getexline, NULL,
DOCMD_VERBOSE|DOCMD_EXCRESET);
debug_break_level = n;
vim_free(cmdline);
}
lines_left = Rows - 1;
}

View File

@@ -753,6 +753,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1832,
/**/
1831,
/**/