olga / rpms / glibc

Forked from rpms/glibc 5 years ago
Clone

Blame SOURCES/glibc-rh1647490-5.patch

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