mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
fix reversed in/out file closing when an error occurs. From Ken Pettit
This commit is contained in:
@@ -621,10 +621,10 @@ int cmd_dd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
ret = OK;
|
||||
|
||||
errout_with_outf:
|
||||
DD_INCLOSE(&dd);
|
||||
DD_OUTCLOSE(&dd);
|
||||
|
||||
errout_with_inf:
|
||||
DD_OUTCLOSE(&dd);
|
||||
DD_INCLOSE(&dd);
|
||||
free(dd.buffer);
|
||||
|
||||
errout_with_paths:
|
||||
|
Reference in New Issue
Block a user