[PATCH] CID1130008: Resource leak

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@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))

On Tue, 19 Nov 2013 20:35:57 +0100 Stefan Reinauer <stefan.reinauer@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@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@alumni.tuwien.ac.at> and committed in r1773, thanks! -- Kind regards/Mit freundlichen Grüßen, Stefan Tauner
participants (2)
-
Stefan Reinauer
-
Stefan Tauner