diff --git a/src/modbus.c b/src/modbus.c
index 08871a25732f60ab7bc5ef9c67fe248a303ecd48..97b98b7c96c9f32feeda38122ab1c5970cd55b23 100644 (file)
--- a/src/modbus.c
+++ b/src/modbus.c
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++)
{