4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-28 03:47:11 +08:00

Merge pull request #3969 from DavidLin1577/patch-12

Update listdir.c
This commit is contained in:
Bernard Xiong 2020-10-18 14:10:09 +08:00 committed by GitHub
commit fe66001bd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,6 +25,7 @@ void list_dir(const char* path)
fullpath = rt_malloc(256); fullpath = rt_malloc(256);
if (fullpath == RT_NULL) if (fullpath == RT_NULL)
{ {
closedir(dir);
rt_kprintf("no memory\n"); rt_kprintf("no memory\n");
return; return;
} }