r20749 by jghali -

scribus-commit scribus-commit at lists.scribus.net
Fri Jan 29 21:46:33 UTC 2016


Author: jghali
Date: Fri Jan 29 21:46:33 2016
New Revision: 20749

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20749
Log:
fix resource leak in object <coverity>

Modified:
    branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp
    branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.h

Modified: branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20749&path=/branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp	(original)
+++ branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.cpp	Fri Jan 29 21:46:33 2016
@@ -63,6 +63,12 @@
 	loadFile(fname);
 }
 
+PdbIm::~PdbIm()
+{
+	if (m_buf)
+		delete m_buf;
+}
+
 void PdbIm::write()
 {
 	QTextCodec *codec;

Modified: branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20749&path=/branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.h
==============================================================================
--- branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.h	(original)
+++ branches/Version14x/Scribus/scribus/plugins/gettext/pdbim/pdbim.h	Fri Jan 29 21:46:33 2016
@@ -119,7 +119,7 @@
 	\param enc user selected text encoding. See encoding attr.
 	\param w a reference to the gtWriter instance */
 	PdbIm(const QString& fname, const QString& enc, gtWriter *w);
-	~PdbIm(){};
+	~PdbIm();
 	/*! \brief Write data into Scribus text frame.
 	User should specify encoding of the imported text - it's recoded here. */
 	void write();




More information about the scribus-commit mailing list