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

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