[flashrom] [PATCH] CID1130008: Resource leak
Stefan Tauner
stefan.tauner at alumni.tuwien.ac.at
Sat Apr 26 20:48:49 CEST 2014
On Tue, 19 Nov 2013 20:35:57 +0100
Stefan Reinauer <stefan.reinauer at coreboot.org> wrote:
> CID1130008: Resource leak
>
> The system resource will not be reclaimed and reused, reducing the future
> availability of the resource.
> In read_romlayout: Leak of memory or pointers to system resources
>
> Signed-off-by: Stefan Reinauer <stefan.reinauer at coreboot.org>
>
> Index: layout.c
> ===================================================================
> --- layout.c (revision 1763)
> +++ layout.c (working copy)
> @@ -65,6 +65,7 @@
> if (num_rom_entries >= MAX_ROMLAYOUT) {
> msg_gerr("Maximum number of ROM images (%i) in layout "
> "file reached.\n", MAX_ROMLAYOUT);
> + fclose(romlayout);
> return 1;
> }
> if (2 != fscanf(romlayout, "%s %s\n", tempstr, rom_entries[num_rom_entries].name))
Acked-by: Stefan Tauner <stefan.tauner at alumni.tuwien.ac.at>
and committed in r1773, thanks!
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
More information about the flashrom
mailing list