shell/main_blksync.c: Fix leak of file descriptor

Coverity Id 1063887. File descriptor not freed on error path.
This commit is contained in:
Joel Sherrill
2014-11-24 14:14:35 -06:00
parent 4afa216ba8
commit 630642e21c

View File

@@ -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;
}