From: Vladimir 'phcoder' Serbinenko Date: Sun, 26 Jun 2011 02:18:45 +0000 (+0200) Subject: Fix a memory leak X-Git-Tag: 2.00~1167^2~42 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc4bfec8fac9a6fdea9ce38f5c7a92bc5579f22e;p=thirdparty%2Fgrub.git Fix a memory leak --- diff --git a/grub-core/net/ethernet.c b/grub-core/net/ethernet.c index 863e659a8..175d0b65f 100644 --- a/grub-core/net/ethernet.c +++ b/grub-core/net/ethernet.c @@ -69,10 +69,14 @@ grub_net_recv_ethernet_packet (struct grub_net_buff * nb, { grub_net_arp_receive (nb); grub_netbuff_free (nb); + return GRUB_ERR_NONE; } /* IP packet. */ if (type == GRUB_NET_ETHERTYPE_IP) - grub_net_recv_ip_packets (nb, card, &hwaddress); - + { + grub_net_recv_ip_packets (nb, card, &hwaddress); + return GRUB_ERR_NONE; + } + grub_netbuff_free (nb); return GRUB_ERR_NONE; }