diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-10-03 11:22:37 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-10-03 11:22:37 -0600 |
commit | df6da71e54060564b40318cde81071c1337470d2 (patch) | |
tree | e6110907a7824bf515e48673d920f5d1b64cb536 /apps/nshlib/nsh_ddcmd.c | |
parent | 6c819d2332d9c9a587e00668f1d9f797b942a951 (diff) | |
download | nuttx-df6da71e54060564b40318cde81071c1337470d2.tar.gz nuttx-df6da71e54060564b40318cde81071c1337470d2.tar.bz2 nuttx-df6da71e54060564b40318cde81071c1337470d2.zip |
fix reversed in/out file closing when an error occurs. From Ken Pettit
Diffstat (limited to 'apps/nshlib/nsh_ddcmd.c')
-rw-r--r-- | apps/nshlib/nsh_ddcmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/nshlib/nsh_ddcmd.c b/apps/nshlib/nsh_ddcmd.c index 58298ea7a..a2d14c003 100644 --- a/apps/nshlib/nsh_ddcmd.c +++ b/apps/nshlib/nsh_ddcmd.c @@ -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: |