aboutsummaryrefslogtreecommitdiff
path: root/swaybar
diff options
context:
space:
mode:
authorFurkan Sahin <furkan-dev@proton.me>2018-12-31 00:56:27 -0500
committerFurkan Sahin <furkan-dev@proton.me>2018-12-31 00:56:27 -0500
commit3a1600867bb7862e60289419836207016ea2d90f (patch)
treed84f36e2e046aa13bd337b933c39bba165b24455 /swaybar
parenta5e8a0de214e9b030cc4d9416f696c601ed5ede3 (diff)
swaybar: fix double free
status->text should not be freed here. There are two scenarios: * status->text has been set to an error by status_error. In this case the value shouldn't be freed because it's always a reference to a constant. * status->text has been set to status->buffer because the bar is in text protocol mode. In this case it's a double free because the buffer is already freed after.
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/status_line.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/swaybar/status_line.c b/swaybar/status_line.c
index 744d2785..2e6ef173 100644
--- a/swaybar/status_line.c
+++ b/swaybar/status_line.c
@@ -185,7 +185,6 @@ void status_line_free(struct status_line *status) {
}
free(status->read);
free(status->write);
- free((char*) status->text);
free(status->buffer);
free(status);
}