From cc8dcf96e71dd643f929e32150904cd6ad69efa8 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 27 Apr 2015 15:41:03 +0200 Subject: test-skeleton: Support temporary files without memory leaks [BZ#18333] add_temp_file now makes a copy which is freed by delete_temp_files. Callers to create_temp_file can now free the returned file name to avoid the memory leak. These changes do not affect the leak behavior of existing code. Also address a NULL pointer derefence in tzset after a memoru allocation failure, found during testing. --- ChangeLog | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'ChangeLog') diff --git a/ChangeLog b/ChangeLog index 7d3e69e..373b12c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2015-04-27 Florian Weimer + + [BZ#18333] + * time/tzset.c (parse_tzname): Return error on memory allocation + failure. + * test-skeleton.c (struct temp_name_list): Change type of name + member to non-const. + (add_temp_file): Create a copy of the file name. + (delete_temp_files): Deallocate memory. + (create_temp_file): Add comment. + 2015-04-24 Florian Weimer * io/posix_fallocate.c (posix_fallocate): Do not set errno. -- cgit v1.1