fix: Fix memory leaks

This commit is contained in:
DreamMaoMao 2025-08-06 12:04:44 +08:00
parent 27b408214e
commit 6ad8a6eef5

View file

@ -1971,6 +1971,7 @@ void cleanupmon(struct wl_listener *listener, void *data) {
wlr_scene_output_destroy(m->scene_output); wlr_scene_output_destroy(m->scene_output);
closemon(m); closemon(m);
free(m->pertag);
free(m); free(m);
} }
@ -4509,7 +4510,6 @@ void setup(void) {
input_method_manager = wlr_input_method_manager_v2_create(dpy); input_method_manager = wlr_input_method_manager_v2_create(dpy);
text_input_manager = wlr_text_input_manager_v3_create(dpy); text_input_manager = wlr_text_input_manager_v3_create(dpy);
dwl_input_method_relay = calloc(1, sizeof(*dwl_input_method_relay));
dwl_input_method_relay = dwl_im_relay_create(); dwl_input_method_relay = dwl_im_relay_create();
wl_global_create(dpy, &zdwl_ipc_manager_v2_interface, 2, NULL, wl_global_create(dpy, &zdwl_ipc_manager_v2_interface, 2, NULL,