From: Vladimir Serbinenko Date: Sat, 24 Jan 2015 23:00:49 +0000 (+0100) Subject: fs/cbfs: Add missing free. X-Git-Tag: 2.02-beta3~516 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b6f21bcb98f03d61087b4423261bda5d6a58fb1f;p=thirdparty%2Fgrub.git fs/cbfs: Add missing free. Found by: Coverity scan. --- diff --git a/grub-core/fs/cbfs.c b/grub-core/fs/cbfs.c index 35750a0e4..4ddd6832f 100644 --- a/grub-core/fs/cbfs.c +++ b/grub-core/fs/cbfs.c @@ -144,7 +144,7 @@ static struct grub_archelp_data * grub_cbfs_mount (grub_disk_t disk) { struct cbfs_file hd; - struct grub_archelp_data *data; + struct grub_archelp_data *data = NULL; grub_uint32_t ptr; grub_off_t header_off; struct cbfs_header head; @@ -196,6 +196,7 @@ grub_cbfs_mount (grub_disk_t disk) return data; fail: + grub_free (data); grub_error (GRUB_ERR_BAD_FS, "not a cbfs filesystem"); return 0; }