nshlib: Fix a typo error of redirect

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2024-10-12 16:37:17 +08:00 committed by Xiang Xiao
parent 0f5a786347
commit 2bfe2c2ed0

View file

@ -2855,10 +2855,12 @@ static int nsh_parse_command(FAR struct nsh_vtbl_s *vtbl, FAR char *cmdline)
vtbl->np.np_redir_out = redirect_out_save;
}
/* Free the redirected input file path */
if (redirfile_in)
{
nsh_freefullpath(redirfile_in);
vtbl->np.np_redir_out = redirect_in_save;
vtbl->np.np_redir_in = redirect_in_save;
}
dynlist_free: