ソースを参照

Fix memory leak when rotating device

Benjamin Schaaf 3 年 前
コミット
7643a403f1
1 ファイル変更3 行追加0 行削除
  1. 3 0
      src/main.c

+ 3 - 0
src/main.c

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