mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
stdlib/test-bz22786: Avoid memory leaks in the test itself
This commit is contained in:
parent
a91e9301c4
commit
6070803053
@ -1,3 +1,8 @@
|
||||
2018-10-30 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* stdlib/test-bz22786.c (do_test): Additional free calls to avoid
|
||||
memory leaks.
|
||||
|
||||
2018-10-30 Florian Weimer <fweimer@redhat.com>
|
||||
|
||||
* support/blob_repeat.c (allocate_big): Call mkstemp directly.
|
||||
|
@ -36,8 +36,8 @@
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
const char *dir = support_create_temp_directory ("bz22786.");
|
||||
const char *lnk = xasprintf ("%s/symlink", dir);
|
||||
char *dir = support_create_temp_directory ("bz22786.");
|
||||
char *lnk = xasprintf ("%s/symlink", dir);
|
||||
const size_t path_len = (size_t) INT_MAX + strlen (lnk) + 1;
|
||||
|
||||
struct support_blob_repeat repeat
|
||||
@ -72,6 +72,8 @@ do_test (void)
|
||||
/* Cleanup. */
|
||||
unlink (lnk);
|
||||
support_blob_repeat_free (&repeat);
|
||||
free (lnk);
|
||||
free (dir);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user