diff -r 2810e55ac99d -r dc22cb54babd thermferm/logger.c --- a/thermferm/logger.c Wed Jun 04 16:00:35 2014 +0200 +++ b/thermferm/logger.c Fri Jun 13 17:43:37 2014 +0200 @@ -47,13 +47,13 @@ if ((logfile = fopen(name, "a+"))) { fprintf(logfile, outstr); fclose(logfile); - free(outstr); - outstr = NULL; } else { syslog(LOG_NOTICE, "logger: cannot open %s for writing", name); } } + free(outstr); + outstr = NULL; free(name); name = NULL; }