diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bc47125 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*~ +*.o +wh1080_rf diff --git a/Makefile b/Makefile index 0340402..62130ec 100755 --- a/Makefile +++ b/Makefile @@ -23,3 +23,6 @@ clean: rm -f wh1080_rf.o bcm2835.o bmp085.o wunderground.o mqtt.o wh1080_rf + +install: wh1080_rf + install wh1080_rf /usr/local/sbin/wh1080_rf diff --git a/mqtt.c b/mqtt.c index e92b201..92b71bb 100644 --- a/mqtt.c +++ b/mqtt.c @@ -67,6 +67,7 @@ } int ret = mosquitto_publish (mosq, NULL, publish_topic, msglen, msg, 0, false); + free(msg); if (ret) { fprintf (stderr, "Can't publish to Mosquitto server\n");