Skip to content

Commit

Permalink
Do not leak empty lines, GitHub issue 1824.
Browse files Browse the repository at this point in the history
  • Loading branch information
nicm committed Jul 9, 2019
1 parent b74b8be commit ad11d49
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ad11d49

Please sign in to comment.