mirror of
https://github.com/tmux/tmux.git
synced 2026-10-16 08:24:23 +00:00
Memory leak fixes from someone in GitHub issues 5739, 5744, 5745, 5746.
This commit is contained in:
5
hooks.c
5
hooks.c
@@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: hooks.c,v 1.16 2026/07/27 19:15:58 nicm Exp $ */
|
||||
/* $OpenBSD: hooks.c,v 1.17 2026/10/15 08:21:11 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2026 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
@@ -164,6 +164,7 @@ hooks_insert(struct cmdq_item *item, struct hooks_data *hd)
|
||||
break;
|
||||
case CMD_PARSE_SUCCESS:
|
||||
hooks_insert_one(item, hd, pr->cmdlist, state);
|
||||
cmd_list_free(pr->cmdlist);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
@@ -178,10 +179,12 @@ hooks_insert(struct cmdq_item *item, struct hooks_data *hd)
|
||||
cmdq_error(item, "%s",
|
||||
pr->error);
|
||||
}
|
||||
free(pr->error);
|
||||
break;
|
||||
case CMD_PARSE_SUCCESS:
|
||||
item = hooks_insert_one(item, hd,
|
||||
pr->cmdlist, state);
|
||||
cmd_list_free(pr->cmdlist);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user