From 072ffe76028ee299358a736127c5b124f571ee21 Mon Sep 17 00:00:00 2001 From: leonardo-albertovich Date: Sat, 7 Sep 2024 06:00:24 +0200 Subject: [PATCH] in_calyptia_fleet: fixed memory leaks (CID 508187) (#9346) * in_calyptia_fleet: fixed memory leaks Signed-off-by: Leonardo Alminana --- plugins/in_calyptia_fleet/in_calyptia_fleet.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/in_calyptia_fleet/in_calyptia_fleet.c b/plugins/in_calyptia_fleet/in_calyptia_fleet.c index cbacc38de76..36443113900 100644 --- a/plugins/in_calyptia_fleet/in_calyptia_fleet.c +++ b/plugins/in_calyptia_fleet/in_calyptia_fleet.c @@ -1985,6 +1985,10 @@ static int create_fleet_file(flb_sds_t fleetdir, (unsigned char *)b64_content, blen); if (ret != 0) { + fclose(fp); + flb_sds_destroy(dst); + flb_sds_destroy(fname); + return -1; }