From a73ca699611321e76063f918b188e246b0cda264 Mon Sep 17 00:00:00 2001 From: Derek Christ Date: Fri, 27 Aug 2021 10:17:37 +0200 Subject: [PATCH] Fix minor memory leak in PythonCaller --- DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp b/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp index 9184a889..f44f4a16 100644 --- a/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp +++ b/DRAMSys/traceAnalyzer/businessObjects/pythoncaller.cpp @@ -126,6 +126,11 @@ PythonCaller::~PythonCaller() Py_DECREF(pCalculateMetricsFunction); Py_DECREF(pGenPlotsFunction); Py_DECREF(pGetMetricsFunction); + + if (pVcdExportFunction) + Py_DECREF(pVcdExportFunction); + + Py_DECREF(pVcdExportDependenciesFunction); Py_Finalize(); }