swaybar: fix memory leaks

master
Ian Fan 5 years ago committed by Simon Ser
parent df48c48123
commit b54f5e170a

@ -438,6 +438,9 @@ void swaybar_seat_free(struct swaybar_seat *seat) {
if (seat->pointer.pointer != NULL) { if (seat->pointer.pointer != NULL) {
wl_pointer_release(seat->pointer.pointer); wl_pointer_release(seat->pointer.pointer);
} }
if (seat->pointer.cursor_theme != NULL) {
wl_cursor_theme_destroy(seat->pointer.cursor_theme);
}
if (seat->pointer.cursor_surface != NULL) { if (seat->pointer.cursor_surface != NULL) {
wl_surface_destroy(seat->pointer.cursor_surface); wl_surface_destroy(seat->pointer.cursor_surface);
} }

@ -40,7 +40,7 @@ void ipc_send_workspace_command(struct swaybar *bar, const char *ws) {
command[d++] = ws[i]; command[d++] = ws[i];
} }
ipc_single_command(bar->ipc_socketfd, IPC_COMMAND, command, &size); free(ipc_single_command(bar->ipc_socketfd, IPC_COMMAND, command, &size));
free(command); free(command);
} }

Loading…
Cancel
Save