projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d657c35
)
(fts_build): Free `head' before returning NULL, in two places,
author
Jim Meyering
<jim@meyering.net>
Fri, 14 Apr 2006 16:26:15 +0000
(16:26 +0000)
committer
Jim Meyering
<jim@meyering.net>
Fri, 14 Apr 2006 16:26:15 +0000
(16:26 +0000)
to avoid leaks. Patch from glibc.
lib/fts.c
patch
|
blob
|
history
diff --git
a/lib/fts.c
b/lib/fts.c
index
eede736
..
e9896cd
100644
(file)
--- a/
lib/fts.c
+++ b/
lib/fts.c
@@
-1010,6
+1010,7
@@
mem1: saved_errno = errno;
fts_safe_changedir(sp, cur->fts_parent, -1, ".."))) {
cur->fts_info = FTS_ERR;
SET(FTS_STOP);
+ fts_lfree(head);
return (NULL);
}
@@
-1017,6
+1018,7
@@
mem1: saved_errno = errno;
if (!nitems) {
if (type == BREAD)
cur->fts_info = FTS_DP;
+ fts_lfree(head);
return (NULL);
}