diff --git a/src/modbus.c b/src/modbus.c
index f18b0afb0d373ad911b6726052d7fb97a8ed0c0e..97b98b7c96c9f32feeda38122ab1c5970cd55b23 100644 (file)
--- a/src/modbus.c
+++ b/src/modbus.c
#include <netdb.h>
-#include <modbus/modbus.h>
+#include <modbus.h>
#ifndef LIBMODBUS_VERSION_CHECK
/* Assume version 2.0.3 */
status = cf_util_get_string_buffer (ci, host->host, sizeof (host->host));
if (status != 0)
+ {
+ sfree (host);
return (status);
+ }
if (host->host[0] == 0)
+ {
+ sfree (host);
return (EINVAL);
+ }
for (i = 0; i < ci->children_num; i++)
{