diff options
author | emersion <contact@emersion.fr> | 2018-10-07 09:57:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-07 09:57:51 +0200 |
commit | 06fade1c8beab328566090fd08afc7bd9d4d98a3 (patch) | |
tree | 02a3529687a10f75d84bcc60fed35a667aaad02c /swaynag | |
parent | 8393266eb5ab046d591595593d8966fa3c791bd5 (diff) | |
parent | e5ece5f8b3ec14bfdbea20597ff1db82369d6331 (diff) |
Merge pull request #2783 from martinetd/swaynag_uaf
swaynag: fix use-after-free in wl_display_dispatch
Diffstat (limited to 'swaynag')
-rw-r--r-- | swaynag/swaynag.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/swaynag/swaynag.c b/swaynag/swaynag.c index 26d3589e..69da851e 100644 --- a/swaynag/swaynag.c +++ b/swaynag/swaynag.c @@ -390,6 +390,10 @@ 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) { @@ -449,8 +453,4 @@ void swaynag_destroy(struct swaynag *swaynag) { if (swaynag->shm) { wl_shm_destroy(swaynag->shm); } - - if (swaynag->display) { - wl_display_disconnect(swaynag->display); - } } |