1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-01 14:11:15 +02:00

layout: Add a method to cleanup layout data structures

Add layout_cleanup() to layout.c and hook it up in cli_classic.c.

Corresponding to flashrom svn r1749.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
This commit is contained in:
Stefan Tauner
2013-09-15 14:01:06 +00:00
parent 88ee040ab9
commit 949ccc8a7e
3 changed files with 18 additions and 2 deletions

View File

@ -221,8 +221,6 @@ int main(int argc, char *argv[])
free(tempstr);
cli_classic_abort_usage();
}
/* FIXME: A pointer to the image name is saved in a static array (of size MAX_ROMLAYOUT)
* by register_include_arg() and needs to be freed after processing them. */
break;
case 'L':
if (++operation_specified > 1) {
@ -527,6 +525,7 @@ out:
for (i = 0; i < chipcount; i++)
free(flashes[i].chip);
layout_cleanup();
free(filename);
free(layoutfile);
free(pparam);