Free last line in swaybar

This commit is contained in:
Drew DeVault 2015-12-13 13:51:04 -05:00
parent c0f75f68b9
commit 36bf4d24cf

View file

@ -79,6 +79,7 @@ void cairo_set_source_u32(cairo_t *cairo, uint32_t color) {
void update() { void update() {
if (!feof(command)) { if (!feof(command)) {
free(line);
line = read_line(command); line = read_line(command);
int l = strlen(line) - 1; int l = strlen(line) - 1;
if (line[l] == '\n') { if (line[l] == '\n') {