mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
procfs: stat() left several fields in uninitialized state.
This commit is contained in:
@@ -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 */
|
||||||
|
|||||||
Reference in New Issue
Block a user