From 89f0e70b82269fe582fb727dc88cb1b3825ce0b4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 24 Aug 2019 03:30:53 +0200 Subject: Fix memory-leak in case of Vamp plugin setup error --- libs/vamp-plugins/TruePeak.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/vamp-plugins/TruePeak.cpp b/libs/vamp-plugins/TruePeak.cpp index 39152d1e7f..3d6c12ee2a 100644 --- a/libs/vamp-plugins/TruePeak.cpp +++ b/libs/vamp-plugins/TruePeak.cpp @@ -219,8 +219,10 @@ Resampler::setup (unsigned int fs_inp, _inmax = k; _pstep = s; return reset (); + } else { + delete[] B; + return 1; } - else return 1; } void -- cgit v1.2.3