diff --git a/steam-runtime-tools/graphics.c b/steam-runtime-tools/graphics.c
index 601d6ada4446c0dabaa939ac3b4fa6979ac12d26..a5b96a4c25f633c7c2abd2d5442ed17ffd02ee6d 100644
--- a/steam-runtime-tools/graphics.c
+++ b/steam-runtime-tools/graphics.c
@@ -427,6 +427,9 @@ out:
   g_ptr_array_unref (argv);
   g_free (output);
   g_clear_error (&error);
+  g_free (platformstring);
+  g_free (filtered_preload);
+  g_strfreev (my_environ);
   return issues;
 }
 
diff --git a/tests/graphics.c b/tests/graphics.c
index 37070a084ccb9580d125dc998d436c74aefcabf0..979f69e76a9e5f5de3bfe7188415cd99d86099b3 100644
--- a/tests/graphics.c
+++ b/tests/graphics.c
@@ -107,6 +107,8 @@ test_object (Fixture *f,
   g_assert_cmpstr (renderer, ==, SRT_TEST_GOOD_GRAPHICS_RENDERER);
   g_assert_cmpstr (version, ==, SRT_TEST_GOOD_GRAPHICS_VERSION);
   g_free (tuple);
+  g_free (renderer);
+  g_free (version);
   g_object_unref (graphics);
 }
 
@@ -151,6 +153,7 @@ test_good_graphics (Fixture *f,
   g_free (version);
 
   g_object_unref (graphics);
+  g_object_unref (info);
 }
 
 /*
@@ -194,6 +197,7 @@ test_bad_graphics (Fixture *f,
   g_free (version);
 
   g_object_unref (graphics);
+  g_object_unref (info);
 }
 
 /*
@@ -237,6 +241,7 @@ test_software_rendering (Fixture *f,
   g_free (version);
 
   g_object_unref (graphics);
+  g_object_unref (info);
 }
 
 int