projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge pull request #1384 from rubenk/irq-close-file-descriptor-on-failure
[collectd.git]
/
src
/
modbus.c
diff --git
a/src/modbus.c
b/src/modbus.c
index
cfc6331
..
d2b0a53
100644
(file)
--- a/
src/modbus.c
+++ b/
src/modbus.c
@@
-942,9
+942,15
@@
static int mb_config_add_host (oconfig_item_t *ci) /* {{{ */
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++)
{