Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
1b929d25
Commit
1b929d25
authored
Jun 16, 1993
by
Jim Blandy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* sysdep.c (closedir): Don't free directory buffer if it looks
like it and the DIR were malloced together.
parent
37fd7901
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
src/sysdep.c
src/sysdep.c
+5
-1
No files found.
src/sysdep.c
View file @
1b929d25
...
...
@@ -2927,7 +2927,11 @@ closedir (dirp)
register
DIR
*
dirp
;
/* stream from opendir */
{
sys_close
(
dirp
->
dd_fd
);
xfree
((
char
*
)
dirp
->
dd_buf
);
/* directory block defined in <dirent.h> */
/* Some systems allocate the buffer and the DIR all in one block.
Why in the world are we freeing this ourselves anyway? */
if
(
dirp
->
dd_buf
!=
(
char
*
)(
dirp
+
1
))
xfree
((
char
*
)
dirp
->
dd_buf
);
/* directory block defined in <dirent.h> */
xfree
((
char
*
)
dirp
);
}
#endif
/* not AIX */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment