From e2abedb3d3744496abd5003faa4ca22ac77ecc4f Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 1 Jul 2014 20:39:25 +0000 Subject: it's ok to free(NULL) --- src/sp12.c | 6 ++---- 1 file 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); } -- cgit v1.2.3