From 1ea93d1cc75b366deb15a60e12cb731de93d6be6 Mon Sep 17 00:00:00 2001 From: Aden Grue Date: Thu, 23 Mar 2023 11:48:10 -0700 Subject: [PATCH] Fix a memory leak in the `write_stackdriver` plugin The `payload` was never freed. This was affecting potentially every call to both the "write" and "flush" callbacks. --- src/write_stackdriver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/write_stackdriver.c b/src/write_stackdriver.c index 8fe85a3ea..a60d0b9b0 100644 --- a/src/write_stackdriver.c +++ b/src/write_stackdriver.c @@ -343,6 +343,7 @@ static int wg_flush_nolock(cdtime_t timeout, wg_callback_t *cb) /* {{{ */ char *payload = sd_output_reset(cb->formatter); int status = wg_call_timeseries_write(cb, payload); wg_reset_buffer(cb); + sfree(payload); return status; } /* }}} wg_flush_nolock */ -- 2.47.2