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