mirror of
https://github.com/swaywm/sway.git
synced 2024-11-13 05:54:11 +01:00
Clean up status line on exit
This commit is contained in:
parent
0d0ab7c5ce
commit
0464a9910d
@ -191,4 +191,9 @@ void bar_teardown(struct swaybar *bar) {
|
|||||||
if (bar->config) {
|
if (bar->config) {
|
||||||
free_config(bar->config);
|
free_config(bar->config);
|
||||||
}
|
}
|
||||||
|
close(bar->ipc_event_socketfd);
|
||||||
|
close(bar->ipc_socketfd);
|
||||||
|
if (bar->status) {
|
||||||
|
status_line_free(bar->status);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -73,6 +73,8 @@ struct status_line *status_line_init(char *cmd) {
|
|||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
void status_line_free(struct status_line *line) {
|
void status_line_free(struct status_line *status) {
|
||||||
free(line);
|
close(status->read_fd);
|
||||||
|
close(status->write_fd);
|
||||||
|
free(status);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user