[libfreehand] fix memory leak
David Tardon
dtardon at fedoraproject.org
Mon Nov 4 09:40:50 UTC 2013
commit f227d6f6be5fa7e054e730a118acb4fec5abf680
Author: David Tardon <dtardon at redhat.com>
Date: Mon Nov 4 10:40:54 2013 +0100
fix memory leak
0001-coverity-fix-memory-leak.patch | 24 ++++++++++++++++++++++++
libfreehand.spec | 9 ++++++++-
2 files changed, 32 insertions(+), 1 deletions(-)
---
diff --git a/0001-coverity-fix-memory-leak.patch b/0001-coverity-fix-memory-leak.patch
new file mode 100644
index 0000000..a373e52
--- /dev/null
+++ b/0001-coverity-fix-memory-leak.patch
@@ -0,0 +1,24 @@
+From 0153352b99336335c5d6eb1635ea4b60574fa971 Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Fri, 1 Nov 2013 12:35:12 +0100
+Subject: [PATCH] coverity: fix memory leak
+
+---
+ src/lib/FHStringVector.cpp | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/lib/FHStringVector.cpp b/src/lib/FHStringVector.cpp
+index 2cab359..a6b5d7d 100644
+--- a/src/lib/FHStringVector.cpp
++++ b/src/lib/FHStringVector.cpp
+@@ -35,6 +35,7 @@ libfreehand::FHStringVector::FHStringVector(const FHStringVector &vec)
+
+ libfreehand::FHStringVector::~FHStringVector()
+ {
++ delete m_pImpl;
+ }
+
+ libfreehand::FHStringVector &libfreehand::FHStringVector::operator=(const FHStringVector &vec)
+--
+1.8.3.1
+
diff --git a/libfreehand.spec b/libfreehand.spec
index 0dcfca6..27431ce 100644
--- a/libfreehand.spec
+++ b/libfreehand.spec
@@ -2,7 +2,7 @@
Name: libfreehand
Version: 0.0.0
-Release: 2%{?dist}
+Release: 3%{?dist}
Summary: A library for import of Macromedia/Adobe FreeHand documents
Group: System Environment/Libraries
@@ -16,6 +16,8 @@ BuildRequires: libwpd-devel
BuildRequires: libwpg-devel
BuildRequires: zlib-devel
+Patch0: 0001-coverity-fix-memory-leak.patch
+
%description
libfreehand is library providing ability to interpret and import
Macromedia/Adobe FreeHand documents into various applications.
@@ -49,6 +51,8 @@ Currently supported: SVG, raw.
%prep
%setup -q
+%patch0 -p1
+
%build
%configure --disable-silent-rules --disable-static --disable-werror
sed -i \
@@ -86,6 +90,9 @@ rm -rf %{buildroot}/%{_docdir}/%{name}
%{_bindir}/fh2svg
%changelog
+* Mon Nov 04 2013 David Tardon <dtardon at redhat.com> - 0.0.0-3
+- fix memory leak
+
* Thu Oct 31 2013 David Tardon <dtardon at redhat.com> 0.0.0-2
- add gperf to BuildRequires
More information about the scm-commits
mailing list