[gnome-keyring] test-pam: Fix GError leak in error case



commit 75c1fb8b8e3eb0df794bd80ed883fdc16a865664
Author: Christophe Fergeau <cfergeau redhat com>
Date:   Wed Oct 1 22:37:26 2014 +0200

    test-pam: Fix GError leak in error case
    
    When g_file_get_contents() fails and sets an error, it must be freed.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=738508

 pam/test-pam.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/pam/test-pam.c b/pam/test-pam.c
index 87d8fe1..bf32a1d 100644
--- a/pam/test-pam.c
+++ b/pam/test-pam.c
@@ -149,6 +149,7 @@ setup (Test *test,
                        return;
                }
        } else if (g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+               g_error_free (error);
                skip_test (test, "missing test pam config");
                return;
        }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]