This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git


The following commit(s) were added to refs/heads/master by this push:
     new 3108c2787 apps/nshlib: Save result and return ERROR if 
`lib_get_tempbuffer()` fails
3108c2787 is described below

commit 3108c278777636246d3df2c58d1681dc533ceba6
Author: wangjianyu3 <wangjian...@xiaomi.com>
AuthorDate: Thu Jan 16 12:12:17 2025 +0800

    apps/nshlib: Save result and return ERROR if `lib_get_tempbuffer()` fails
    
    Signed-off-by: wangjianyu3 <wangjian...@xiaomi.com>
---
 nshlib/nsh_parse.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/nshlib/nsh_parse.c b/nshlib/nsh_parse.c
index d60e4c768..e21381b9f 100644
--- a/nshlib/nsh_parse.c
+++ b/nshlib/nsh_parse.c
@@ -616,6 +616,7 @@ static int nsh_execute(FAR struct nsh_vtbl_s *vtbl,
         {
           nsh_error(vtbl, g_fmtcmdoutofmemory, sh_cmd);
           ret = -errno;
+          goto close_redir;
         }
 
       sh_arg2[0] = '\0';

Reply via email to