Fixes for memory leaks reported by Lu Ming Yin, fixes from Howard Chu.

This commit is contained in:
nicm
2024-04-15 08:19:55 +00:00
parent 553d4cba79
commit e8530c9fee
4 changed files with 9 additions and 2 deletions

View File

@@ -143,6 +143,7 @@ cmd_command_prompt_exec(struct cmd *self, struct cmdq_item *item)
cdata->prompt_type = status_prompt_type(type);
if (cdata->prompt_type == PROMPT_TYPE_INVALID) {
cmdq_error(item, "unknown type: %s", type);
cmd_command_prompt_free(cdata);
return (CMD_RETURN_ERROR);
}
} else