]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 22 Jun 2012 09:51:48 +0000 (11:51 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 22 Jun 2012 09:51:48 +0000 (11:51 +0200)
* grub-core/net/drivers/ieee1275/ofnet.c
(grub_ieee1275_net_config_real): Likewise.

ChangeLog
grub-core/kern/main.c
grub-core/net/drivers/ieee1275/ofnet.c

index 8fa0a9f55298e085ca405ed315453bb45edff0a7..e40f7e9021fa0f8f6b2ca1be0bdce5405602bdb5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/kern/main.c (grub_set_prefix_and_root): Fix memory leak.
+       * grub-core/net/drivers/ieee1275/ofnet.c
+       (grub_ieee1275_net_config_real): Likewise.
+
 2012-06-21  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/net/bootp.c (grub_net_configure_by_dhcp_ack): Don't create
index de9ba927ec1279670305e0ad3b31480e2b34d8fb..326244419eb6c47fa85266c4d74ea48578a90f63 100644 (file)
@@ -165,8 +165,12 @@ grub_set_prefix_and_root (void)
       grub_free (device);
       device = new_device;
     }
+  else
+    grub_free (fwdevice);
   if (fwpath && !path)
     path = fwpath;
+  else
+    grub_free (fwpath);
   if (device)
     {
       char *prefix_set;
index 44aa2fdf3a8d0f0cf3167ad870dc4ab402c09fdf..7e8e2a7446dfb9fce26925106c31675530431994 100644 (file)
@@ -193,6 +193,7 @@ grub_ieee1275_net_config_real (const char *devpath, char **device, char **path)
                                     + bootp_response_properties[i].offset),
                                    size - bootp_response_properties[i].offset,
                                    1, device, path);
+    grub_free (bootp_response);
     return;
   }
 }