aboutsummaryrefslogtreecommitdiff
path: root/swaynag/swaynag.c
diff options
context:
space:
mode:
Diffstat (limited to 'swaynag/swaynag.c')
-rw-r--r--swaynag/swaynag.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c
index 5620155d..08e26127 100644
--- a/swaynag/swaynag.c
+++ b/swaynag/swaynag.c
@@ -483,10 +483,6 @@ void swaynag_run(struct swaynag *swaynag) {
&& wl_display_dispatch(swaynag->display) != -1) {
// This is intentionally left blank
}
-
- if (swaynag->display) {
- wl_display_disconnect(swaynag->display);
- }
}
void swaynag_destroy(struct swaynag *swaynag) {
@@ -501,6 +497,7 @@ void swaynag_destroy(struct swaynag *swaynag) {
}
list_free(swaynag->buttons);
free(swaynag->details.message);
+ free(swaynag->details.details_text);
free(swaynag->details.button_up.text);
free(swaynag->details.button_down.text);
@@ -541,4 +538,8 @@ void swaynag_destroy(struct swaynag *swaynag) {
if (swaynag->shm) {
wl_shm_destroy(swaynag->shm);
}
+
+ if (swaynag->display) {
+ wl_display_disconnect(swaynag->display);
+ }
}