summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-24 20:40:41 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-24 22:17:53 +0200
commita1976555e0ebb9fc1575c2241e8b0878ccb66410 (patch)
tree8ffeab304934dc4ce830202e9c5c76b642ed45ac
parent4aa12018c8078cabf1b74e5564cfac8b8a53b787 (diff)
fix some newer leaks
Change-Id: I3a13406db4e441c3a29056f80cb728da2ecc3c25 Reviewed-on: https://gerrit.libreoffice.org/42720 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/unx/generic/printer/cpdmgr.cxx7
1 files changed, 4 insertions, 3 deletions
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);