978e96
commit 60708030536df82616c16aa2f14f533c4362b969
978e96
Author: Florian Weimer <fweimer@redhat.com>
978e96
Date:   Tue Oct 30 13:56:40 2018 +0100
978e96
978e96
    stdlib/test-bz22786: Avoid memory leaks in the test itself
978e96
978e96
diff --git a/stdlib/test-bz22786.c b/stdlib/test-bz22786.c
978e96
index bb1e04f2debe9042..8035e8a394e7d034 100644
978e96
--- a/stdlib/test-bz22786.c
978e96
+++ b/stdlib/test-bz22786.c
978e96
@@ -36,8 +36,8 @@
978e96
 static int
978e96
 do_test (void)
978e96
 {
978e96
-  const char *dir = support_create_temp_directory ("bz22786.");
978e96
-  const char *lnk = xasprintf ("%s/symlink", dir);
978e96
+  char *dir = support_create_temp_directory ("bz22786.");
978e96
+  char *lnk = xasprintf ("%s/symlink", dir);
978e96
   const size_t path_len = (size_t) INT_MAX + strlen (lnk) + 1;
978e96
 
978e96
   struct support_blob_repeat repeat
978e96
@@ -72,6 +72,8 @@ do_test (void)
978e96
   /* Cleanup.  */
978e96
   unlink (lnk);
978e96
   support_blob_repeat_free (&repeat);
978e96
+  free (lnk);
978e96
+  free (dir);
978e96
 
978e96
   return 0;
978e96
 }