Fix memory leaks

This commit is contained in:
project-repo 2020-03-06 21:04:29 +01:00
commit cb46e463a3
2 changed files with 2 additions and 0 deletions

View file

@ -147,6 +147,7 @@ message_printf(struct cg_output *output, const char *fmt, ...) {
message_set_output(output, buffer, box, CG_MESSAGE_TOP_RIGHT);
free(buffer);
free(box);
alarm(output->server->message_timeout);
}

View file

@ -51,6 +51,7 @@ workspace_focus_tile(struct cg_workspace *ws, struct cg_tile *tile) {
box->x = tile->tile.x + tile->tile.width / 2;
box->y = tile->tile.y + tile->tile.height / 2;
message_printf_pos(ws->output, box, CG_MESSAGE_CENTER, "Current frame");
free(box);
}
void