Skip to content

Commit 2bfe2c2

Browse files
JianyuWang0623xiaoxiang781216
authored andcommitted
nshlib: Fix a typo error of redirect
Signed-off-by: wangjianyu3 <[email protected]>
1 parent 0f5a786 commit 2bfe2c2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

nshlib/nsh_parse.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -2855,10 +2855,12 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline)
28552855
vtbl->np.np_redir_out = redirect_out_save;
28562856
}
28572857

2858+
/* Free the redirected input file path */
2859+
28582860
if (redirfile_in)
28592861
{
28602862
nsh_freefullpath(redirfile_in);
2861-
vtbl->np.np_redir_out = redirect_in_save;
2863+
vtbl->np.np_redir_in = redirect_in_save;
28622864
}
28632865

28642866
dynlist_free:

0 commit comments

Comments
 (0)