util/grub-mkrescue: Fix memory leak in write_part()
In the function write_part(), the value of inname is not used beyond the grub_util_fopen() call, so it should be freed to avoid leakage. Fixes: CID 314028 Signed-off-by: Darren Kenny <darren.kenny@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
e07fcea291
commit
eff17a6b2d
@ -229,6 +229,7 @@ write_part (FILE *f, const char *srcdir)
|
||||
char *inname = grub_util_path_concat (2, srcdir, "partmap.lst");
|
||||
char buf[260];
|
||||
in = grub_util_fopen (inname, "rb");
|
||||
free (inname);
|
||||
if (!in)
|
||||
return;
|
||||
while (fgets (buf, 256, in))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user