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