projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c15b840
)
network plugin: Fix a minor memory leak.
author
Florian Forster
<octo@huhu.verplant.org>
Thu, 9 Oct 2008 06:43:20 +0000
(08:43 +0200)
committer
Florian Forster
<octo@huhu.verplant.org>
Thu, 9 Oct 2008 06:43:20 +0000
(08:43 +0200)
Thanks to Niraj Tolia for reporting this :)
src/network.c
patch
|
blob
|
history
diff --git
a/src/network.c
b/src/network.c
index
0f558ca
..
0ea51b3
100644
(file)
--- a/
src/network.c
+++ b/
src/network.c
@@
-1550,7
+1550,10
@@
static int network_config (const char *key, const char *val)
fields_num = strsplit (val_cpy, fields, 3);
if ((fields_num != 1)
&& (fields_num != 2))
+ {
+ sfree (val_cpy);
return (1);
+ }
else if (fields_num == 2)
{
if ((service = strchr (fields[1], '.')) != NULL)
@@
-1563,6
+1566,8
@@
static int network_config (const char *key, const char *val)
network_add_listen_socket (node, service);
else
network_add_sending_socket (node, service);
+
+ sfree (val_cpy);
}
else if (strcasecmp ("TimeToLive", key) == 0)
{