diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-01-17 10:59:13 +0100 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2013-01-17 11:00:32 +0100 |
commit | 91f1eea16dac133609a9a083f7e34d5d4ce44003 (patch) | |
tree | 47619b1406b0afc1c15758822fa3753830525886 | |
parent | fd9566988e2fd19b8b48b74e5ec856cbe0ac4303 (diff) | |
download | libsoup-91f1eea16dac133609a9a083f7e34d5d4ce44003.tar.gz libsoup-91f1eea16dac133609a9a083f7e34d5d4ce44003.tar.bz2 libsoup-91f1eea16dac133609a9a083f7e34d5d4ce44003.zip |
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
-rw-r--r-- | libsoup/soup-session.c | 3 |
1 files changed, 2 insertions, 1 deletions
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"); |