Blame SOURCES/0001-Related-rhbz-1602527-CTOR_DTOR_LEAK-coverity-warning.patch

39512d
From cf661dac92704ed738252f29b0925f15aee85609 Mon Sep 17 00:00:00 2001
39512d
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
39512d
Date: Thu, 19 Jul 2018 17:01:38 +0100
39512d
Subject: [PATCH] Related: rhbz#1602527 CTOR_DTOR_LEAK coverity warning
39512d
39512d
tests/featuremap/featuremaptest.cpp:180: alloc_new: Allocating memory by calling "new char[font_size]".
39512d
tests/featuremap/featuremaptest.cpp:180: var_assign: Assigning: "this->_header" = "new char[font_size]".
39512d
tests/featuremap/featuremaptest.cpp:180: ctor_dtor_leak: The constructor allocates field "_header" of "face_handle" but there is no destructor.
39512d
---
39512d
 tests/featuremap/featuremaptest.cpp | 5 +++++
39512d
 1 file changed, 5 insertions(+)
39512d
39512d
diff --git a/tests/featuremap/featuremaptest.cpp b/tests/featuremap/featuremaptest.cpp
39512d
index afbf339..901ea39 100644
39512d
--- a/tests/featuremap/featuremaptest.cpp
39512d
+++ b/tests/featuremap/featuremaptest.cpp
39512d
@@ -187,6 +187,11 @@ public:
39512d
 	    _dir = _header + dir_off;
39512d
 	}
39512d
 
39512d
+	~face_handle()
39512d
+	{
39512d
+		delete [] _header;
39512d
+	}
39512d
+
39512d
 	void replace_table(const TtfUtil::Tag name, const void * const data, size_t len) throw() {
39512d
 		_tables[name] = std::make_pair(data, len);
39512d
 	}
39512d
-- 
39512d
2.17.0
39512d