projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(from parent 1:
fda77d5
)
Auto-Merge pull request #2942 from rubenk/ntpd-plug-leak
author
collectd bot
<32910397+collectd-bot@users.noreply.github.com>
Tue, 9 Oct 2018 11:38:05 +0000
(13:38 +0200)
committer
GitHub
<noreply@github.com>
Tue, 9 Oct 2018 11:38:05 +0000
(13:38 +0200)
Automatically merged due to "Automerge" label
src/ntpd.c
patch
|
blob
|
history
diff --git
a/src/ntpd.c
b/src/ntpd.c
index
0faf2a2
..
9b4ba60
100644
(file)
--- a/
src/ntpd.c
+++ b/
src/ntpd.c
@@
-832,11
+832,13
@@
static int ntpd_read(void) {
if (status != 0) {
ERROR("ntpd plugin: ntpd_do_query (REQ_GET_KERNEL) failed with status %i",
status);
+ free(ik);
return status;
} else if ((ik == NULL) || (ik_num == 0) || (ik_size == 0)) {
ERROR("ntpd plugin: ntpd_do_query returned unexpected data. "
"(ik = %p; ik_num = %i; ik_size = %i)",
(void *)ik, ik_num, ik_size);
+ free(ik);
return -1;
}