]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
efidisk: fix memory leak
authorAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 12 Jan 2016 18:16:34 +0000 (21:16 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Tue, 12 Jan 2016 18:52:50 +0000 (21:52 +0300)
Found by: Coverity scan.
CID: 96644

grub-core/disk/efi/efidisk.c

index a8783a3c17764678e0f8acd456a332a12ae0731d..1c00e3ec8f702e1cf12d383ab6099bb710e4d79a 100644 (file)
@@ -85,6 +85,12 @@ make_devices (void)
        {
          /* Uggh.  */
          grub_free (handles);
+         while (devices)
+           {
+             d = devices->next;
+             grub_free (devices);
+             devices = d;
+           }
          return 0;
        }