summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-07-01 20:39:25 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-07-01 20:39:25 +0000
commite2abedb3d3744496abd5003faa4ca22ac77ecc4f (patch)
treea0a768074d8535b823eaf09394d61358eb0eb307
parentc318dfa1af4cc70e2f9ea48965288bb7d1a630b1 (diff)
it's ok to free(NULL)
-rw-r--r--src/sp12.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/sp12.c b/src/sp12.c
index c415394..0f219ab 100644
--- a/src/sp12.c
+++ b/src/sp12.c
@@ -119,10 +119,8 @@ void exitSp12(int exitState) {
sp12End = clock();
sp12Elapsed = ((double) (sp12End - sp12Start)) / CLOCKS_PER_SEC;
printf("Sp12 was active for %#3.2f seconds.\n", sp12Elapsed);
- if (flashBuf)
- free(flashBuf);
- if (eepromBuf)
- free(eepromBuf);
+ free(flashBuf);
+ free(eepromBuf);
exit(exitState);
}