]> git.proxmox.com Git - grub2.git/commitdiff
zfs: memory leak
authorAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Fri, 19 Jun 2015 15:38:25 +0000 (18:38 +0300)
Found by Coverity scan.
CID: 96603

grub-core/fs/zfs/zfs.c

index f9ca0e75e362a7f5e771da5f4e548fd072b9eb18..252cefdc63ed7be54bb37d085caabe5f4c8cb54c 100644 (file)
@@ -3668,6 +3668,8 @@ zfs_mount (grub_device_t dev)
                         data) != 0)
     {
       grub_error (GRUB_ERR_BAD_FS, "Unsupported features in pool");
+      grub_free (osp);
+      zfs_unmount (data);
       return NULL;
     }