[glib-networking/glib-2-30] gnutls: fix g_tls_file_database_new() with a NULL GError to not crash
- From: Dan Winship <danw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib-networking/glib-2-30] gnutls: fix g_tls_file_database_new() with a NULL GError to not crash
- Date: Wed, 4 Jan 2012 15:50:00 +0000 (UTC)
commit ed3460fa929359a72a68456f97bbdc85396f0668
Author: Dan Winship <danw gnome org>
Date: Thu Oct 20 17:10:55 2011 -0400
gnutls: fix g_tls_file_database_new() with a NULL GError to not crash
tls/gnutls/gtlsfiledatabase-gnutls.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/tls/gnutls/gtlsfiledatabase-gnutls.c b/tls/gnutls/gtlsfiledatabase-gnutls.c
index f393be5..e94f993 100644
--- a/tls/gnutls/gtlsfiledatabase-gnutls.c
+++ b/tls/gnutls/gtlsfiledatabase-gnutls.c
@@ -221,12 +221,14 @@ load_anchor_file (const gchar *filename,
GByteArray *subject;
GByteArray *issuer;
gint gerr;
+ GError *my_error = NULL;
- g_assert (error);
-
- list = g_tls_certificate_list_new_from_file (filename, error);
- if (*error)
- return FALSE;
+ list = g_tls_certificate_list_new_from_file (filename, &my_error);
+ if (my_error)
+ {
+ g_propagate_error (error, my_error);
+ return FALSE;
+ }
for (l = list; l; l = l->next)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]