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