Reported by: Francesco Lavra.
+2013-04-13 Vladimir Serbinenko <phcoder@gmail.com>
+
+ Fix memory leaks in ofnet.
+ Reported by: Francesco Lavra.
+
2013-04-12 Vladimir Serbinenko <phcoder@gmail.com>
* docs/man/grub-glue-efi.h2m: Add missing file.
nb = grub_netbuff_alloc (dev->mtu + 64 + 2);
if (!nb)
- {
- grub_netbuff_free (nb);
- return NULL;
- }
+ return NULL;
/* Reserve 2 bytes so that 2 + 14/18 bytes of ethernet header is divisible
by 4. So that IP header is aligned on 4 bytes. */
grub_netbuff_reserve (nb, 2);
card->txbuf = grub_zalloc (card->txbufsize);
if (!card->txbuf)
{
+ grub_free (ofdata->path);
+ grub_free (ofdata);
+ grub_free (card);
grub_print_error ();
return 0;
}