summaryrefslogtreecommitdiffstats
path: root/pcp
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2021-06-11 13:30:31 +1000
committerBenBE <BenBE@geshi.org>2021-06-13 19:51:00 +0200
commite3d0fc1a5a705665c26a4a703c5b082d337da533 (patch)
tree67255c20a701c2e831fa584b2bed31fcbb26a8f3 /pcp
parent6f9b161b247ecf15a1942841e8b94fe27fecbbec (diff)
Fix a PCP diagnostics typo, add missing pmFreeResult null check.
Diffstat (limited to 'pcp')
-rw-r--r--pcp/Platform.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pcp/Platform.c b/pcp/Platform.c
index 072ec50e..42db6be1 100644
--- a/pcp/Platform.c
+++ b/pcp/Platform.c
@@ -377,7 +377,7 @@ bool Metric_fetch(struct timeval *timestamp) {
int sts = pmFetch(pcp->total, pcp->fetch, &pcp->result);
if (sts < 0) {
if (pmDebugOptions.appl0)
- fprintf(stderr, "Error: cannot fetch metric values): %s\n",
+ fprintf(stderr, "Error: cannot fetch metric values: %s\n",
pmErrStr(sts));
return false;
}
@@ -506,7 +506,8 @@ void Platform_init(void) {
void Platform_done(void) {
pmDestroyContext(pcp->context);
- pmFreeResult(pcp->result);
+ if (pcp->result)
+ pmFreeResult(pcp->result);
free(pcp->release);
free(pcp->fetch);
free(pcp->pmids);

© 2014-2024 Faster IT GmbH | imprint | privacy policy