grub2/0214-fs-ntfs-Add-missing-free.patch
Peter Jones 8c6b1ac71e Reconcile with upstream once again.
Also include some minor fixes for gcc 5.1.1

Signed-off-by: Peter Jones <pjones@redhat.com>
2015-07-22 09:46:32 -04:00

30 lines
755 B
Diff

From bc0ecd7104b3420964364b7a01b7dd7141081b9b Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Sun, 25 Jan 2015 13:22:24 +0100
Subject: [PATCH 214/506] fs/ntfs: Add missing free.
Found by: Coverity scan.
---
grub-core/fs/ntfs.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/grub-core/fs/ntfs.c b/grub-core/fs/ntfs.c
index d3a91f5..2cbcb0b 100644
--- a/grub-core/fs/ntfs.c
+++ b/grub-core/fs/ntfs.c
@@ -618,7 +618,10 @@ list_file (struct grub_ntfs_file *diro, grub_uint8_t *pos,
ustr = get_utf8 (np, ns);
if (ustr == NULL)
- return 0;
+ {
+ grub_free (fdiro);
+ return 0;
+ }
if (namespace)
type |= GRUB_FSHELP_CASE_INSENSITIVE;
--
2.4.3