diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-10-02 19:02:41 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-10-02 19:02:41 +0000 |
commit | 16d1b47b4f3f9ae13535ea7a2c02bd207c069d5c (patch) | |
tree | 975d67b5fe35279f3f4834b4c345b18b927a57b9 /io/fts.c | |
parent | af47bc499af76c844b28d9ca912ed81f2a353708 (diff) | |
download | glibc-16d1b47b4f3f9ae13535ea7a2c02bd207c069d5c.tar glibc-16d1b47b4f3f9ae13535ea7a2c02bd207c069d5c.tar.gz glibc-16d1b47b4f3f9ae13535ea7a2c02bd207c069d5c.tar.bz2 glibc-16d1b47b4f3f9ae13535ea7a2c02bd207c069d5c.zip |
Updated to fedora-glibc-20061002T1858cvs/fedora-glibc-2_5-2cvs/fedora-2_5-base
Diffstat (limited to 'io/fts.c')
-rw-r--r-- | io/fts.c | 11 |
1 files changed, 3 insertions, 8 deletions
@@ -251,8 +251,7 @@ fts_close(sp) /* Free up child linked list, sort array, path buffer. */ if (sp->fts_child) fts_lfree(sp->fts_child); - if (sp->fts_array) - free(sp->fts_array); + free(sp->fts_array); free(sp->fts_path); /* Return to original directory, save errno if necessary. */ @@ -705,8 +704,7 @@ fts_build(sp, type) * structures already allocated. */ mem1: saved_errno = errno; - if (p) - free(p); + free(p); fts_lfree(head); (void)__closedir(dirp); cur->fts_info = FTS_ERR; @@ -1043,10 +1041,7 @@ fts_palloc(sp, more) * We limit fts_pathlen to USHRT_MAX to be safe in both cases. */ if (sp->fts_pathlen < 0 || sp->fts_pathlen >= USHRT_MAX) { - if (sp->fts_path) { - free(sp->fts_path); - sp->fts_path = NULL; - } + free(sp->fts_path); sp->fts_path = NULL; __set_errno (ENAMETOOLONG); return (1); |