Fixed memory leak.

master
MadcowOG 2023-02-24 02:57:30 -08:00
parent 71b11d0df8
commit 63296c343b
1 changed files with 1 additions and 0 deletions

View File

@ -316,6 +316,7 @@ Bar* bar_create(void) {
char* status = ecalloc(8, sizeof(*status)); char* status = ecalloc(8, sizeof(*status));
snprintf(status, 8, "dwl %.1f", VERSION); snprintf(status, 8, "dwl %.1f", VERSION);
pango_layout_set_text(bar->status.layout, status, strlen(status)); pango_layout_set_text(bar->status.layout, status, strlen(status));
free(status);
for (int i = 0; i < LENGTH(tags); i++) { for (int i = 0; i < LENGTH(tags); i++) {
BarComponent component = bar_component_create(bar->context, bar_font.description); BarComponent component = bar_component_create(bar->context, bar_font.description);