From: Vladimir 'phcoder' Serbinenko Date: Tue, 25 Oct 2011 22:29:46 +0000 (+0200) Subject: * grub-core/fs/ntfs.c (grub_ntfs_uuid): Fix a memory leak. X-Git-Tag: 2.00~1059 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e9cc6b7b0e26f38b22a72ecc931273b22a9e1d2a;p=thirdparty%2Fgrub.git * grub-core/fs/ntfs.c (grub_ntfs_uuid): Fix a memory leak. --- diff --git a/ChangeLog b/ChangeLog index 9f05edaa2..3b0b4697a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2011-10-25 Vladimir Serbinenko + + * grub-core/fs/ntfs.c (grub_ntfs_uuid): Fix a memory leak. + 2011-10-25 Vladimir Serbinenko * grub-core/fs/fat.c (grub_fat_uuid): Make uppercase to match Linux. diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c index 5d128bcc0..6b8455c34 100644 --- a/grub-core/fs/ntfs.c +++ b/grub-core/fs/ntfs.c @@ -1087,14 +1087,15 @@ grub_ntfs_uuid (grub_device_t device, char **uuid) if (*uuid) for (ptr = *uuid; *ptr; ptr++) *ptr = grub_toupper (*ptr); + free_file (&data->mmft); + free_file (&data->cmft); + grub_free (data); } else *uuid = NULL; grub_dl_unref (my_mod); - grub_free (data); - return grub_errno; }