]> git.proxmox.com Git - grub2.git/commitdiff
commands/syslinux: Add missing free.
authorVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 20:23:25 +0000 (21:23 +0100)
committerVladimir Serbinenko <phcoder@gmail.com>
Sat, 24 Jan 2015 20:23:25 +0000 (21:23 +0100)
Found by: Coverity scan.

grub-core/commands/syslinuxcfg.c

index 00ae113c5a7083b3f75a38c2e9e175055db8097a..7be28fada90b11278c0aa82017ae3eae9f8bd25b 100644 (file)
@@ -119,7 +119,10 @@ syslinux_file (grub_extcmd_context_t ctxt, const char *filename)
     {
       menu = grub_zalloc (sizeof (*menu));
       if (! menu)
-       return grub_errno;
+       {
+         grub_free (result);
+         return grub_errno;
+       }
 
       grub_env_set_menu (menu);
     }