forked from Imagelibrary/rtems
shell/main_blksync.c: Fix leak of file descriptor
Coverity Id 1063887. File descriptor not freed on error path.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user