[Libreoffice-commits] core.git: vcl/unx
Caolán McNamara
caolanm at redhat.com
Sun Sep 24 20:18:32 UTC 2017
vcl/unx/generic/printer/cpdmgr.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit a1976555e0ebb9fc1575c2241e8b0878ccb66410
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sun Sep 24 20:40:41 2017 +0100
fix some newer leaks
Change-Id: I3a13406db4e441c3a29056f80cb728da2ecc3c25
Reviewed-on: https://gerrit.libreoffice.org/42720
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/unx/generic/printer/cpdmgr.cxx b/vcl/unx/generic/printer/cpdmgr.cxx
index 04f5adb9ce80..eb5c079e4625 100644
--- a/vcl/unx/generic/printer/cpdmgr.cxx
+++ b/vcl/unx/generic/printer/cpdmgr.cxx
@@ -248,9 +248,8 @@ CPDManager* CPDManager::tryLoadCPD()
if (!pEnv || !*pEnv) {
GDir *dir;
- GError *error = nullptr;
const gchar *filename;
- dir = g_dir_open(BACKEND_DIR, 0, &error);
+ dir = g_dir_open(BACKEND_DIR, 0, nullptr);
if (dir != nullptr) {
while ((filename = g_dir_read_name(dir))) {
if (pManager == nullptr) {
@@ -328,7 +327,6 @@ const PPDParser* CPDManager::createCPDParser( const OUString& rPrinter )
if( dest_it != m_aCPDDestMap.end() )
{
-
CPDPrinter* pDest = dest_it->second;
GVariant* ret = nullptr;
GError* error = nullptr;
@@ -457,7 +455,10 @@ const PPDParser* CPDManager::createCPDParser( const OUString& rPrinter )
g_variant_unref(ret);
}
else
+ {
+ g_clear_error(&error);
SAL_INFO("vcl.unx.print", "CPD GetAllOptions failed, falling back to generic driver");
+ }
}
else
SAL_INFO("vcl.unx.print", "no dest found for printer " << aPrinter);
More information about the Libreoffice-commits
mailing list