mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
shell/main_blksync.c: Fix leak of file descriptor
Coverity Id 1063887. File descriptor not freed on error path.
This commit is contained in:
1 parent
4afa216ba8
commit
630642e21c
1 file changed
+1
@@ -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