Fix memory leak when rotating device

This commit is contained in:
Benjamin Schaaf
2021-11-12 01:18:55 +11:00
parent 05d6c3fa6d
commit 7643a403f1

View File

@@ -819,6 +819,7 @@ static void display_config_received(GDBusConnection *conn, GAsyncResult *res, gp
if (!result) { if (!result) {
printf("Failed to get display configuration: %s\n", error->message); printf("Failed to get display configuration: %s\n", error->message);
g_object_unref(error);
return; return;
} }
@@ -839,6 +840,8 @@ static void display_config_received(GDBusConnection *conn, GAsyncResult *res, gp
update_io_pipeline(); update_io_pipeline();
update_ui_rotation(); update_ui_rotation();
} }
g_variant_unref(result);
} }
static void update_screen_rotation(GDBusConnection *conn) static void update_screen_rotation(GDBusConnection *conn)