diff options
author | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2013-09-15 14:01:06 +0000 |
---|---|---|
committer | stefanct <stefanct@2b7e53f0-3cfb-0310-b3e9-8179ed1497e1> | 2013-09-15 14:01:06 +0000 |
commit | 8b90348c7b8a7e50f86687130a9b89a7a16d4c7a (patch) | |
tree | 8aaa82d92b1b7366c53552da0b089bf83f37e55f /layout.c | |
parent | 17e6b0728efb89275b94300fa7b72f19e4b68aab (diff) | |
download | flashrom-8b90348c7b8a7e50f86687130a9b89a7a16d4c7a.tar.gz |
layout: Add a method to cleanup layout data structures.
Add layout_cleanup() to layout.c and hook it up in cli_classic.c.
Signed-off-by: Stefan Tauner <stefan.tauner@student.tuwien.ac.at>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
git-svn-id: https://code.coreboot.org/svn/flashrom/trunk@1749 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'layout.c')
-rw-r--r-- | layout.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -3,6 +3,7 @@ * * Copyright (C) 2005-2008 coresystems GmbH * (Written by Stefan Reinauer <stepan@coresystems.de> for coresystems GmbH) + * Copyright (C) 2011-2013 Stefan Tauner * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -189,6 +190,21 @@ int process_include_args(void) return 0; } +void layout_cleanup(void) +{ + int i; + for (i = 0; i < num_include_args; i++) { + free(include_args[i]); + include_args[i] = NULL; + } + num_include_args = 0; + + for (i = 0; i < num_rom_entries; i++) { + rom_entries[i].included = 0; + } + num_rom_entries = 0; +} + romentry_t *get_next_included_romentry(unsigned int start) { int i; |