From b3c59f832d6a20f073db093322ba171b96d841f8 Mon Sep 17 00:00:00 2001 From: Michael Uleysky Date: Mon, 15 Feb 2016 22:20:05 +1000 Subject: [PATCH] Gmt module: Fix memory leak, pointer returned by Get() must be deleted, so, use Find() instead. --- modules/gmt/modgmt_func.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/gmt/modgmt_func.h b/modules/gmt/modgmt_func.h index 4899020..6a4a6aa 100644 --- a/modules/gmt/modgmt_func.h +++ b/modules/gmt/modgmt_func.h @@ -21,7 +21,7 @@ class Base2Something: public OBTypeM public: Base2Something(const ObjectBase* arg):OBTypeM(arg) {}; - Base2Something(const ObjectList* input, const std::string& name):OBTypeM(input->Get(name)){}; + Base2Something(const ObjectList* input, const std::string& name):OBTypeM(input->Find(name)){}; Base2Something(const ObjectList* input, const ObjectList::ListValues::size_type i):OBTypeM((iSize())?input->At(i):0){}; // Check index, because At is not safe template auto operator ()(bool* b, Args... args) const -> decltype(this->OBTypeM::template operator()(b, args...))