fix reversed in/out file closing when an error occurs. From Ken Pettit
This commit is contained in:
parent
c40e173036
commit
79169c711f
@ -621,10 +621,10 @@ int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
|
|
||||||
errout_with_outf:
|
errout_with_outf:
|
||||||
DD_INCLOSE(&dd);
|
DD_OUTCLOSE(&dd);
|
||||||
|
|
||||||
errout_with_inf:
|
errout_with_inf:
|
||||||
DD_OUTCLOSE(&dd);
|
DD_INCLOSE(&dd);
|
||||||
free(dd.buffer);
|
free(dd.buffer);
|
||||||
|
|
||||||
errout_with_paths:
|
errout_with_paths:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user