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 <Masayuki.Ishikawa@jp.sony.com>
This commit is contained in:
Masayuki Ishikawa 2022-09-01 09:47:30 +09:00 committed by Petro Karashchenko
parent 63cd44e5e1
commit 27985fa639

View File

@ -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;
}