aboutsummaryrefslogtreecommitdiffstats
path: root/swaybar
diff options
context:
space:
mode:
authorLibravatar Ian Fan <ianfan0@gmail.com>2020-03-05 16:28:43 +0000
committerLibravatar Simon Ser <contact@emersion.fr>2020-03-30 17:31:00 +0200
commitb54f5e170a2936bc272aca7fe44a90059f6da716 (patch)
tree17cad312fbe415706927de260a48837656523bd9 /swaybar
parentadd --no-repeat option for bindings (diff)
downloadsway-b54f5e170a2936bc272aca7fe44a90059f6da716.tar.gz
sway-b54f5e170a2936bc272aca7fe44a90059f6da716.tar.zst
sway-b54f5e170a2936bc272aca7fe44a90059f6da716.zip
swaybar: fix memory leaks
Diffstat (limited to 'swaybar')
-rw-r--r--swaybar/input.c3
-rw-r--r--swaybar/ipc.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/swaybar/input.c b/swaybar/input.c
index c0352300..f768cd40 100644
--- a/swaybar/input.c
+++ b/swaybar/input.c
@@ -438,6 +438,9 @@ void swaybar_seat_free(struct swaybar_seat *seat) {
438 if (seat->pointer.pointer != NULL) { 438 if (seat->pointer.pointer != NULL) {
439 wl_pointer_release(seat->pointer.pointer); 439 wl_pointer_release(seat->pointer.pointer);
440 } 440 }
441 if (seat->pointer.cursor_theme != NULL) {
442 wl_cursor_theme_destroy(seat->pointer.cursor_theme);
443 }
441 if (seat->pointer.cursor_surface != NULL) { 444 if (seat->pointer.cursor_surface != NULL) {
442 wl_surface_destroy(seat->pointer.cursor_surface); 445 wl_surface_destroy(seat->pointer.cursor_surface);
443 } 446 }
diff --git a/swaybar/ipc.c b/swaybar/ipc.c
index a3a9b495..f3b7dd3d 100644
--- a/swaybar/ipc.c
+++ b/swaybar/ipc.c
@@ -40,7 +40,7 @@ void ipc_send_workspace_command(struct swaybar *bar, const char *ws) {
40 command[d++] = ws[i]; 40 command[d++] = ws[i];
41 } 41 }
42 42
43 ipc_single_command(bar->ipc_socketfd, IPC_COMMAND, command, &size); 43 free(ipc_single_command(bar->ipc_socketfd, IPC_COMMAND, command, &size));
44 free(command); 44 free(command);
45} 45}
46 46