Mon, 07 Jul 2014 22:51:59 +0200
Fixed NULL writing
thermferm/rdconfig.c | file | annotate | diff | comparison | revisions |
--- a/thermferm/rdconfig.c Mon Jul 07 22:31:07 2014 +0200 +++ b/thermferm/rdconfig.c Mon Jul 07 22:51:59 2014 +0200 @@ -173,7 +173,7 @@ syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; } - if ((rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_ADDRESS", "%s", Config.air_address)) < 0) { + if (Config.air_address && (rc = xmlTextWriterWriteFormatElement(writer, BAD_CAST "AIR_ADDRESS", "%s", Config.air_address)) < 0) { syslog(LOG_NOTICE, "wrconfig: error at xmlTextWriterWriteFormatElement"); return 1; }