]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2005-10-11 Marco Gerards <mgerards@xs4all.nl>
authormarco_g <marco_g@localhost>
Tue, 11 Oct 2005 16:42:32 +0000 (16:42 +0000)
committermarco_g <marco_g@localhost>
Tue, 11 Oct 2005 16:42:32 +0000 (16:42 +0000)
* fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
allocated.
(grub_sfs_dir): Likewise.

ChangeLog
fs/sfs.c

index 4d3987ecf691e72cf51d1dd050f882d5465a4778..d53f922155389397a59a65909c38ef8688d833c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-10-11  Marco Gerards  <mgerards@xs4all.nl>
+
+       * fs/sfs.c (grub_sfs_open): Don't free `data->label' if it is not
+       allocated.
+       (grub_sfs_dir): Likewise.
+
 2005-10-09  Marco Gerards  <mgerards@xs4all.nl>
 
        Add support for the SFS filesystem.
index 83fc0e9038220fd814fd819b340208bb67e9c71c..23640e2d6aa6ecc7684df5baf1560addd850e8f7 100644 (file)
--- a/fs/sfs.c
+++ b/fs/sfs.c
@@ -485,7 +485,8 @@ grub_sfs_open (struct grub_file *file, const char *name)
  fail:
   if (data && fdiro != &data->diropen)
     grub_free (fdiro);
-  grub_free (data->label);
+  if (data)
+    grub_free (data->label);
   grub_free (data);
   
 #ifndef GRUB_UTIL
@@ -565,7 +566,8 @@ grub_sfs_dir (grub_device_t device, const char *path,
  fail:
   if (data && fdiro != &data->diropen)
     grub_free (fdiro);
-  grub_free (data->label);
+  if (data)
+    grub_free (data->label);
   grub_free (data);
 
 #ifndef GRUB_UTIL