You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libmwaw/0004-avoid-leak.patch

30 lines
979 B

From d1dc868e2530d3301b401e45662392a173de1557 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Wed, 20 Nov 2013 09:03:23 +0100
Subject: [PATCH 4/8] avoid leak
(cherry picked from commit 454a6ce3062da9d273978868088bf07b68cd9fa2)
Signed-off-by: osnola <alonso@loria.fr>
---
src/lib/MSKGraph.cxx | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/lib/MSKGraph.cxx b/src/lib/MSKGraph.cxx
index dd873c1..7c1a9f6 100644
--- a/src/lib/MSKGraph.cxx
+++ b/src/lib/MSKGraph.cxx
@@ -1550,7 +1550,10 @@ int MSKGraph::getEntryPicture(int zoneId, MWAWEntry &zone, bool autoSend, int or
MSKGraphInternal::Chart *chart = new MSKGraphInternal::Chart(pict);
int chartId = m_state->m_chartId++;
if (!m_tableParser->readChart(chartId, chart->m_style))
+ {
+ delete chart;
return -1;
+ }
m_tableParser->setChartZoneId(chartId, int(m_state->m_zonesList.size()));
chart->m_chartId = chartId;
res.reset(chart);
--
1.9.0