projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
76c004d
)
plugin.c: plug leak on error
author
Ruben Kerkhof
<ruben@rubenkerkhof.com>
Sat, 4 Jul 2015 17:56:20 +0000
(19:56 +0200)
committer
Florian Forster
<octo@collectd.org>
Fri, 10 Jul 2015 09:23:10 +0000
(11:23 +0200)
src/plugin.c
patch
|
blob
|
history
diff --git
a/src/plugin.c
b/src/plugin.c
index
cb1005e
..
8dfb2c2
100644
(file)
--- a/
src/plugin.c
+++ b/
src/plugin.c
@@
-1133,8
+1133,10
@@
int plugin_register_read (const char *name,
rf->rf_interval = plugin_get_interval ();
status = plugin_insert_read (rf);
- if (status != 0)
+ if (status != 0) {
+ sfree (rf->rf_name);
sfree (rf);
+ }
return (status);
} /* int plugin_register_read */
@@
-1181,8
+1183,10
@@
int plugin_register_complex_read (const char *group, const char *name,
rf->rf_ctx = plugin_get_ctx ();
status = plugin_insert_read (rf);
- if (status != 0)
+ if (status != 0) {
+ sfree (rf->rf_name);
sfree (rf);
+ }
return (status);
} /* int plugin_register_complex_read */