You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/09/01 21:26:01 UTC
[incubator-nuttx] 01/02: fs: procfs: Skip to register for meminfo if the name is NULL
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 27985fa639d8c1d4babe981d3c44e99a27efabb3
Author: Masayuki Ishikawa <ma...@gmail.com>
AuthorDate: Thu Sep 1 09:47:30 2022 +0900
fs: procfs: Skip to register for meminfo if the name is NULL
Summary:
- This commit skips to register for meminfo if the name is NULL
Impact:
- None
Testing:
- Tested with sabre-6quad:netknsh (umm_heap will be updated later)
Signed-off-by: Masayuki Ishikawa <Ma...@jp.sony.com>
---
fs/procfs/fs_procfsmeminfo.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/fs/procfs/fs_procfsmeminfo.c b/fs/procfs/fs_procfsmeminfo.c
index 1c35ed972e..49d55ea795 100644
--- a/fs/procfs/fs_procfsmeminfo.c
+++ b/fs/procfs/fs_procfsmeminfo.c
@@ -578,6 +578,11 @@ static int meminfo_stat(FAR const char *relpath, FAR struct stat *buf)
void procfs_register_meminfo(FAR struct procfs_meminfo_entry_s *entry)
{
+ if (NULL == entry->name)
+ {
+ return;
+ }
+
entry->next = g_procfs_meminfo;
g_procfs_meminfo = entry;
}