From 91f1eea16dac133609a9a083f7e34d5d4ce44003 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Thu, 17 Jan 2013 10:59:13 +0100 Subject: set_ssl_ca_file: don't try unreffing tlsdb if it's NULL If g_tls_file_database_new() failed for any reason but G_TLS_ERROR_UNAVAILABLE, we don't create a fallback DB and so tlsdb stays NULL. https://bugzilla.gnome.org/show_bug.cgi?id=691930 --- libsoup/soup-session.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libsoup/soup-session.c b/libsoup/soup-session.c index bfc71fc9..ab9e2cd8 100644 --- a/libsoup/soup-session.c +++ b/libsoup/soup-session.c @@ -503,7 +503,8 @@ set_ssl_ca_file (SoupSession *session, const char *ssl_ca_file) } set_tlsdb (session, tlsdb); - g_object_unref (tlsdb); + if (tlsdb) + g_object_unref (tlsdb); priv->ssl_ca_file = g_strdup (ssl_ca_file); g_object_notify (G_OBJECT (session), "ssl-ca-file"); -- cgit v1.2.3