Make sure we initialise dirp->dd_size if we aren't reading a unionfs

directory.

Special thanks to: valgrind
This commit is contained in:
Doug Rabson 2003-12-26 12:00:46 +00:00
parent 0bc6ba1fd2
commit 4da7d0f5dd
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=123861

View File

@ -258,6 +258,7 @@ __opendir2(name, flags)
dirp->dd_size = ddptr - dirp->dd_buf;
} else {
dirp->dd_len = incr;
dirp->dd_size = 0;
dirp->dd_buf = malloc(dirp->dd_len);
if (dirp->dd_buf == NULL)
goto fail;