]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
commands/hdparm: Add missing grub_disk_close.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 19:55:06 +0000 (20:55 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 19:55:06 +0000 (20:55 +0100)
Found by: Coverity scan.

grub-core/commands/hdparm.c

index 3fb08912d824ce75acd1435f21e7bc3662db05a6..f6b178eae3dd4b406547f85d7b20a1542f787937 100644 (file)
@@ -329,6 +329,7 @@ grub_cmd_hdparm (grub_extcmd_context_t ctxt, int argc, char **args)
          break;
        }
     default:
+      grub_disk_close (disk);
       return grub_error (GRUB_ERR_IO, "not an ATA device");
     }