projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ef62964
)
write_http plugin: Fixed a memory leak in the "StoreRates" code.
author
Sebastian Harl
<sh@tokkee.org>
Tue, 16 Feb 2010 22:54:02 +0000
(23:54 +0100)
committer
Sebastian Harl
<sh@tokkee.org>
Thu, 25 Feb 2010 23:21:37 +0000
(
00:21
+0100)
src/write_http.c
patch
|
blob
|
history
diff --git
a/src/write_http.c
b/src/write_http.c
index
62e3cf3
..
a7aafec
100644
(file)
--- a/
src/write_http.c
+++ b/
src/write_http.c
@@
-288,9
+288,15
@@
static int wh_value_list_to_string (char *buffer, /* {{{ */
status = ssnprintf (buffer + offset, buffer_size - offset, \
__VA_ARGS__); \
if (status < 1) \
+ { \
+ sfree (rates); \
return (-1); \
+ } \
else if (((size_t) status) >= (buffer_size - offset)) \
+ { \
+ sfree (rates); \
return (-1); \
+ } \
else \
offset += ((size_t) status); \
} while (0)
@@
-332,6
+338,7
@@
static int wh_value_list_to_string (char *buffer, /* {{{ */
#undef BUFFER_ADD
+sfree (rates);
return (0);
} /* }}} int wh_value_list_to_string */