From 11c032d23d497871ef08e9e78fea9dc30e0b589e Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Tue, 31 Oct 2023 17:29:23 +0100 Subject: [PATCH] fuzzers/filename_fuzzer.cpp: fix memleak [ci skip] --- fuzzers/filename_fuzzer.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fuzzers/filename_fuzzer.cpp b/fuzzers/filename_fuzzer.cpp index 97355669a976..f7300358c7b7 100644 --- a/fuzzers/filename_fuzzer.cpp +++ b/fuzzers/filename_fuzzer.cpp @@ -103,6 +103,10 @@ int LLVMFuzzerTestOneInput(const uint8_t *buf, size_t len) VSIFCloseL(fp); delete GDALDataset::Open(osRealFilename.c_str()); } + else + { + VSIFree(paby); + } VSIRmdirRecursive("/vsimem/");