diff options
Diffstat (limited to 'apps/nshlib/nsh_parse.c')
-rw-r--r-- | apps/nshlib/nsh_parse.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index f679d9b32..26b41e89b 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -1424,6 +1424,13 @@ int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline) * successfully). So certainly it is not an NSH command. */ + /* Free the redirected output file path */ + + nsh_freefullpath(redirfile); + redirfile = NULL; + + /* Save the result: success if 0; failure if 1 */ + return nsh_saveresult(vtbl, ret != OK); } @@ -1458,6 +1465,13 @@ int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline) * successfully). So certainly it is not an NSH command. */ + /* Free the redirected output file path */ + + nsh_freefullpath(redirfile); + redirfile = NULL; + + /* Save the result: success if 0; failure if 1 */ + return nsh_saveresult(vtbl, ret != OK); } |