arrfab / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1647490-5.patch

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