mirror of
https://github.com/tmux/tmux.git
synced 2024-12-13 10:08:47 +00:00
Fix a couple of memory leaks, from Romain Francoise.
This commit is contained in:
parent
3e270af17a
commit
77a2174685
4
cfg.c
4
cfg.c
@ -131,8 +131,10 @@ load_cfg(const char *path, struct cmd_ctx *ctxin, struct causelist *causes)
|
|||||||
buf = copy;
|
buf = copy;
|
||||||
while (isspace((u_char)*buf))
|
while (isspace((u_char)*buf))
|
||||||
buf++;
|
buf++;
|
||||||
if (*buf == '\0')
|
if (*buf == '\0') {
|
||||||
|
free(copy);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (cmd_string_parse(buf, &cmdlist, &cause) != 0) {
|
if (cmd_string_parse(buf, &cmdlist, &cause) != 0) {
|
||||||
free(copy);
|
free(copy);
|
||||||
|
@ -413,7 +413,6 @@ const struct mode_key_entry mode_key_emacs_copy[] = {
|
|||||||
{ '\026' /* C-v */, 0, MODEKEYCOPY_NEXTPAGE },
|
{ '\026' /* C-v */, 0, MODEKEYCOPY_NEXTPAGE },
|
||||||
{ '\027' /* C-w */, 0, MODEKEYCOPY_COPYSELECTION },
|
{ '\027' /* C-w */, 0, MODEKEYCOPY_COPYSELECTION },
|
||||||
{ '\033' /* Escape */, 0, MODEKEYCOPY_CANCEL },
|
{ '\033' /* Escape */, 0, MODEKEYCOPY_CANCEL },
|
||||||
{ 'N', 0, MODEKEYCOPY_SEARCHREVERSE },
|
|
||||||
{ 'b' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSWORD },
|
{ 'b' | KEYC_ESCAPE, 0, MODEKEYCOPY_PREVIOUSWORD },
|
||||||
{ 'f', 0, MODEKEYCOPY_JUMP },
|
{ 'f', 0, MODEKEYCOPY_JUMP },
|
||||||
{ 'f' | KEYC_ESCAPE, 0, MODEKEYCOPY_NEXTWORDEND },
|
{ 'f' | KEYC_ESCAPE, 0, MODEKEYCOPY_NEXTWORDEND },
|
||||||
|
Loading…
Reference in New Issue
Block a user