[Libreoffice-commits] core.git: vcl/unx
Julien Nabet
serval2412 at yahoo.fr
Sat Sep 23 08:38:49 UTC 2017
vcl/unx/generic/printer/cpdmgr.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 9ebd8fba49e012bc514c738dec6066b20750728e
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Sep 23 00:43:54 2017 +0200
cid#1418339: resource leak
Change-Id: I87374e32e787f58aa5e4d1b6a78fcd1dddcccdf6
Reviewed-on: https://gerrit.libreoffice.org/42680
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index 60a050bd7471..f39a73a881dc 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -411,7 +411,7 @@ const PPDParser* CPDManager::createCPDParser( const OUString& rPrinter )
// if( pValue )
// pValue->m_aValue = aDefaultValue;
}
- keys.push_back(pKey);
+ keys.emplace_back(pKey);
}
pKey = new PPDKey("ModelName");
@@ -420,6 +420,7 @@ const PPDParser* CPDManager::createCPDParser( const OUString& rPrinter )
if( pValue )
pValue->m_aValue = aValueName;
pKey -> m_pDefaultValue = pValue;
+ keys.emplace_back(pKey);
pKey = new PPDKey("NickName");
aValueName = OStringToOUString( pDest -> name, aEncoding );
@@ -427,6 +428,7 @@ const PPDParser* CPDManager::createCPDParser( const OUString& rPrinter )
if( pValue )
pValue->m_aValue = aValueName;
pKey -> m_pDefaultValue = pValue;
+ keys.emplace_back(pKey);
pNewParser = new PPDParser(aPrinter, keys);
PrinterInfo& rInfo = m_aPrinters[ aPrinter ].m_aInfo;
More information about the Libreoffice-commits
mailing list