4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-01-18 18:43:31 +08:00

Update msh_file.c

This commit is contained in:
David Lin 2020-06-13 10:13:51 +08:00 committed by GitHub
parent 7129694f38
commit 5bb38bb4e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,7 +101,11 @@ int msh_exec_script(const char *cmd_line, int size)
int length;
line_buf = (char *) rt_malloc(RT_CONSOLEBUF_SIZE);
if (line_buf == RT_NULL) return -RT_ENOMEM;
if (line_buf == RT_NULL)
{
close(fd);
return -RT_ENOMEM;
}
/* read line by line and then exec it */
do