summaryrefslogtreecommitdiffstats
path: root/web/api/formatters/value/value.c
diff options
context:
space:
mode:
Diffstat (limited to 'web/api/formatters/value/value.c')
-rw-r--r--web/api/formatters/value/value.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/web/api/formatters/value/value.c b/web/api/formatters/value/value.c
index ce48c343ca..1d07f62f6a 100644
--- a/web/api/formatters/value/value.c
+++ b/web/api/formatters/value/value.c
@@ -93,7 +93,8 @@ QUERY_VALUE rrdmetric2value(RRDHOST *host,
};
ONEWAYALLOC *owa = onewayalloc_create(16 * 1024);
- RRDR *r = rrd2rrdr(owa, query_target_create(&qtr));
+ QUERY_TARGET *qt = query_target_create(&qtr);
+ RRDR *r = rrd2rrdr(owa, qt);
QUERY_VALUE qv;
@@ -143,6 +144,7 @@ QUERY_VALUE rrdmetric2value(RRDHOST *host,
}
rrdr_free(owa, r);
+ query_target_release(qt);
onewayalloc_destroy(owa);
return qv;