From 82e47403c6a8d6fff90f77e9262840050b8e6b2e Mon Sep 17 00:00:00 2001 From: nicm Date: Fri, 31 May 2019 11:34:09 +0000 Subject: Allow % strings that are all numbers or %s, and fix a double free. Both reported by George Nachman, GitHub issues 1765 and 1766. --- control.c | 1 - 1 file changed, 1 deletion(-) (limited to 'control.c') diff --git a/control.c b/control.c index b7ac3f62..16fa71bb 100644 --- a/control.c +++ b/control.c @@ -91,7 +91,6 @@ control_callback(struct client *c, int closed, __unused void *data) case CMD_PARSE_ERROR: item = cmdq_get_callback(control_error, pr->error); cmdq_append(c, item); - free(pr->error); break; case CMD_PARSE_SUCCESS: item = cmdq_get_command(pr->cmdlist, NULL, NULL, 0); -- cgit From ad11d49d640c911b42c5292b5f5b7dbdffb4908b Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 9 Jul 2019 13:19:36 +0000 Subject: Do not leak empty lines, GitHub issue 1824. --- control.c | 1 + 1 file changed, 1 insertion(+) (limited to 'control.c') diff --git a/control.c b/control.c index 16fa71bb..c4cf5338 100644 --- a/control.c +++ b/control.c @@ -80,6 +80,7 @@ control_callback(struct client *c, int closed, __unused void *data) if (line == NULL) break; if (*line == '\0') { /* empty line exit */ + free(line); c->flags |= CLIENT_EXIT; break; } -- cgit