1
0
mirror of https://review.coreboot.org/flashrom.git synced 2025-07-02 06:23:18 +02:00

Introduce generic shutdown_free() and remove redundant internal_shutdown()

The former will be useful in cases where cleanup equals a simple call to free().

Corresponding to flashrom svn r1848.

Signed-off-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
Acked-by: Stefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
This commit is contained in:
Stefan Tauner
2014-08-31 00:09:21 +00:00
parent 4e32ec19b1
commit 2a1ed77f84
3 changed files with 7 additions and 7 deletions

View File

@ -373,6 +373,12 @@ static bool all_skipped = true;
static int check_block_eraser(const struct flashctx *flash, int k, int log);
int shutdown_free(void *data)
{
free(data);
return 0;
}
/* Register a function to be executed on programmer shutdown.
* The advantage over atexit() is that you can supply a void pointer which will
* be used as parameter to the registered function upon programmer shutdown.