procfs: stat() left several fields in uninitialized state.

This commit is contained in:
Gregory Nutt 2017-02-14 09:00:48 -06:00
parent 191fb658d0
commit 74d30a0dbc

View File

@ -964,6 +964,7 @@ static int procfs_stat(struct inode *mountpt, const char *relpath,
* is a file. * is a file.
*/ */
memset(buf, 0, sizeof(struct stat));
if (!relpath || relpath[0] == '\0') if (!relpath || relpath[0] == '\0')
{ {
/* The path refers to the top level directory */ /* The path refers to the top level directory */