From aa36899d8a54d359bf3da997fb6f681199e49938 Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 24 Apr 2018 22:04:19 +0100 Subject: Fix a bunch of swaybar memory leaks --- swaybar/i3bar.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'swaybar/i3bar.c') diff --git a/swaybar/i3bar.c b/swaybar/i3bar.c index dced13d2..141612a6 100644 --- a/swaybar/i3bar.c +++ b/swaybar/i3bar.c @@ -7,7 +7,7 @@ #include "swaybar/config.h" #include "swaybar/status_line.h" -static void i3bar_block_free(struct i3bar_block *block) { +void i3bar_block_free(struct i3bar_block *block) { if (!block) { return; } @@ -18,6 +18,7 @@ static void i3bar_block_free(struct i3bar_block *block) { free(block->name); free(block->instance); free(block->color); + free(block); } static bool i3bar_parse_json(struct status_line *status, const char *text) { -- cgit v1.2.3-54-g00ecf