diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-11-24 14:14:35 -0600 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2014-11-25 12:57:09 -0600 |
commit | 630642e21c44bd953e41bfd5aaf2fb8a4528ed77 (patch) | |
tree | d53bce7a42b91ef4911364d93447ae4abaf75af2 | |
parent | cpukit/libmisc/shell/main_edit.c: Fix use after free() (diff) | |
download | rtems-630642e21c44bd953e41bfd5aaf2fb8a4528ed77.tar.bz2 |
shell/main_blksync.c: Fix leak of file descriptor
Coverity Id 1063887. File descriptor not freed on error path.
-rw-r--r-- | cpukit/libmisc/shell/main_blksync.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cpukit/libmisc/shell/main_blksync.c b/cpukit/libmisc/shell/main_blksync.c index 7c32b79fef..9b1cd24fbc 100644 --- a/cpukit/libmisc/shell/main_blksync.c +++ b/cpukit/libmisc/shell/main_blksync.c @@ -58,6 +58,7 @@ static int rtems_shell_main_blksync( if (rtems_disk_fd_sync (fd) < 0) { fprintf( stderr, "%s: driver sync failed: %s\n", argv[0], strerror (errno)); + close (fd); return 1; } |