[gnome-online-accounts] kerberos: Plug leak in error handling



commit cfa8ff616ada67dd41e45f5bc0841b7a15651e8f
Author: Ray Strode <rstrode redhat com>
Date:   Wed Oct 29 16:13:11 2014 -0400

    kerberos: Plug leak in error handling
    
    It's a little tedious to convert a kerberos error into a GError,
    so there's a helper function to do it: set_error_from_krb5_error_code
    
    That helper function leaks the format string use for constructing the
    GError's message.
    
    This commit fixes that.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=739590

 src/goaidentity/goakerberosidentity.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentity.c b/src/goaidentity/goakerberosidentity.c
index ab86d36..6635c26 100644
--- a/src/goaidentity/goakerberosidentity.c
+++ b/src/goaidentity/goakerberosidentity.c
@@ -319,6 +319,7 @@ set_error_from_krb5_error_code (GoaKerberosIdentity  *self,
   va_start (args, format);
   literal_message = g_strdup_vprintf (expanded_format, args);
   va_end (args);
+  g_free (expanded_format);
 
   g_set_error_literal (error, GOA_IDENTITY_ERROR, code, literal_message);
   g_free (literal_message);


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