diff -up libsoup-2.62.2/libsoup/soup-auth.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-auth.c
--- libsoup-2.62.2/libsoup/soup-auth.c.coverity-scan-issues	2018-03-23 14:44:39.000000000 +0100
+++ libsoup-2.62.2/libsoup/soup-auth.c	2018-06-22 11:25:33.383294057 +0200
@@ -349,10 +345,12 @@ soup_auth_authenticate (SoupAuth *auth,
 gboolean
 soup_auth_is_for_proxy (SoupAuth *auth)
 {
-	SoupAuthPrivate *priv = soup_auth_get_instance_private (auth);
+	SoupAuthPrivate *priv;
 
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), FALSE);
 
+	priv = soup_auth_get_instance_private (auth);
+
 	return priv->proxy;
 }
 
@@ -367,9 +365,14 @@ soup_auth_is_for_proxy (SoupAuth *auth)
 const char *
 soup_auth_get_scheme_name (SoupAuth *auth)
 {
+	SoupAuthClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL);
 
-	return SOUP_AUTH_GET_CLASS (auth)->scheme_name;
+	klass = SOUP_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, NULL);
+
+	return klass->scheme_name;
 }
 
 /**
@@ -383,10 +386,12 @@ soup_auth_get_scheme_name (SoupAuth *aut
 const char *
 soup_auth_get_host (SoupAuth *auth)
 {
-	SoupAuthPrivate *priv = soup_auth_get_instance_private (auth);
+	SoupAuthPrivate *priv;
 
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL);
 
+	priv = soup_auth_get_instance_private (auth);
+
 	return priv->host;
 }
 
@@ -423,13 +428,18 @@ soup_auth_get_realm (SoupAuth *auth)
 char *
 soup_auth_get_info (SoupAuth *auth)
 {
+	SoupAuthClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL);
 
+	klass = SOUP_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, NULL);
+
 	if (SOUP_IS_CONNECTION_AUTH (auth))
-		return g_strdup (SOUP_AUTH_GET_CLASS (auth)->scheme_name);
+		return g_strdup (klass->scheme_name);
 	else {
 		return g_strdup_printf ("%s:%s",
-					SOUP_AUTH_GET_CLASS (auth)->scheme_name,
+					klass->scheme_name,
 					auth->realm);
 	}
 }
@@ -445,9 +455,14 @@ soup_auth_get_info (SoupAuth *auth)
 gboolean
 soup_auth_is_authenticated (SoupAuth *auth)
 {
+	SoupAuthClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), TRUE);
 
-	return SOUP_AUTH_GET_CLASS (auth)->is_authenticated (auth);
+	klass = SOUP_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, TRUE);
+
+	return klass->is_authenticated (auth);
 }
 
 /**
@@ -464,10 +479,15 @@ soup_auth_is_authenticated (SoupAuth *au
 char *
 soup_auth_get_authorization (SoupAuth *auth, SoupMessage *msg)
 {
+	SoupAuthClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL);
 	g_return_val_if_fail (msg != NULL, NULL);
 
-	return SOUP_AUTH_GET_CLASS (auth)->get_authorization (auth, msg);
+	klass = SOUP_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, NULL);
+
+	return klass->get_authorization (auth, msg);
 }
 
 /**
@@ -488,13 +508,18 @@ gboolean
 soup_auth_is_ready (SoupAuth    *auth,
 		    SoupMessage *msg)
 {
+	SoupAuthClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), TRUE);
 	g_return_val_if_fail (SOUP_IS_MESSAGE (msg), TRUE);
 
-	if (SOUP_AUTH_GET_CLASS (auth)->is_ready)
-		return SOUP_AUTH_GET_CLASS (auth)->is_ready (auth, msg);
+	klass = SOUP_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, TRUE);
+
+	if (klass->is_ready)
+		return klass->is_ready (auth, msg);
 	else
-		return SOUP_AUTH_GET_CLASS (auth)->is_authenticated (auth);
+		return klass->is_authenticated (auth);
 }
 
 /**
@@ -511,9 +536,14 @@ soup_auth_is_ready (SoupAuth    *auth,
 gboolean
 soup_auth_can_authenticate (SoupAuth *auth)
 {
+	SoupAuthClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), FALSE);
 
-	return SOUP_AUTH_GET_CLASS (auth)->can_authenticate (auth);
+	klass = SOUP_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, FALSE);
+
+	return klass->can_authenticate (auth);
 }
 
 /**
@@ -533,10 +563,15 @@ soup_auth_can_authenticate (SoupAuth *au
 GSList *
 soup_auth_get_protection_space (SoupAuth *auth, SoupURI *source_uri)
 {
+	SoupAuthClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_AUTH (auth), NULL);
 	g_return_val_if_fail (source_uri != NULL, NULL);
 
-	return SOUP_AUTH_GET_CLASS (auth)->get_protection_space (auth, source_uri);
+	klass = SOUP_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, NULL);
+
+	return klass->get_protection_space (auth, source_uri);
 }
 
 /**
diff -up libsoup-2.62.2/libsoup/soup-cache.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-cache.c
--- libsoup-2.62.2/libsoup/soup-cache.c.coverity-scan-issues	2018-03-23 14:44:54.000000000 +0100
+++ libsoup-2.62.2/libsoup/soup-cache.c	2018-06-22 11:25:33.384294057 +0200
@@ -1226,10 +1232,15 @@ soup_cache_has_response (SoupCache *cach
 SoupCacheability
 soup_cache_get_cacheability (SoupCache *cache, SoupMessage *msg)
 {
+	SoupCacheClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_CACHE (cache), SOUP_CACHE_UNCACHEABLE);
 	g_return_val_if_fail (SOUP_IS_MESSAGE (msg), SOUP_CACHE_UNCACHEABLE);
 
-	return SOUP_CACHE_GET_CLASS (cache)->get_cacheability (cache, msg);
+	klass = SOUP_CACHE_GET_CLASS (cache);
+	g_return_val_if_fail (klass != NULL, SOUP_CACHE_UNCACHEABLE);
+
+	return klass->get_cacheability (cache, msg);
 }
 
 static gboolean
diff -up libsoup-2.62.2/libsoup/soup-connection-auth.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-connection-auth.c
--- libsoup-2.62.2/libsoup/soup-connection-auth.c.coverity-scan-issues	2018-03-23 14:44:54.000000000 +0100
+++ libsoup-2.62.2/libsoup/soup-connection-auth.c	2018-06-22 11:25:33.384294057 +0200
@@ -39,8 +39,14 @@ soup_connection_auth_free_connection_sta
 					    SoupConnection     *conn,
 					    gpointer            state)
 {
+	SoupConnectionAuthClass *klass;
+
 	g_signal_handlers_disconnect_by_func (conn, G_CALLBACK (connection_disconnected), auth);
-	SOUP_CONNECTION_AUTH_GET_CLASS (auth)->free_connection_state (auth, state);
+
+	klass = SOUP_CONNECTION_AUTH_GET_CLASS (auth);
+	g_return_if_fail (klass != NULL);
+
+	klass->free_connection_state (auth, state);
 }
 
 static void
@@ -91,6 +97,7 @@ soup_connection_auth_get_connection_stat
 						       SoupMessage *msg)
 {
 	SoupConnection *conn;
+	SoupConnectionAuthClass *klass;
 	gpointer state;
 
 	g_return_val_if_fail (SOUP_IS_CONNECTION_AUTH (auth), NULL);
@@ -101,7 +108,10 @@ soup_connection_auth_get_connection_stat
 	if (state)
 		return state;
 
-	state = SOUP_CONNECTION_AUTH_GET_CLASS (auth)->create_connection_state (auth);
+	klass = SOUP_CONNECTION_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, NULL);
+
+	state = klass->create_connection_state (auth);
 	if (conn) {
 		g_signal_connect (conn, "disconnected",
 				  G_CALLBACK (connection_disconnected), auth);
@@ -117,12 +127,15 @@ soup_connection_auth_update (SoupAuth
 			     GHashTable  *auth_params)
 {
 	SoupConnectionAuth *cauth = SOUP_CONNECTION_AUTH (auth);
+	SoupConnectionAuthClass *klass = SOUP_CONNECTION_AUTH_GET_CLASS (auth);
 	gpointer conn = soup_connection_auth_get_connection_state_for_message (cauth, msg);
 	GHashTableIter iter;
 	GString *auth_header;
 	gpointer key, value;
 	gboolean result;
 
+	g_return_val_if_fail (klass != NULL, FALSE);
+
 	/* Recreate @auth_header out of @auth_params. If the
 	 * base64 data ended with 1 or more "="s, then it
 	 * will have been parsed as key=value. Otherwise
@@ -147,8 +160,7 @@ soup_connection_auth_update (SoupAuth
 		}
 	}
 
-	result = SOUP_CONNECTION_AUTH_GET_CLASS (auth)->
-		update_connection (cauth, msg, auth_header->str, conn);
+	result = klass->update_connection (cauth, msg, auth_header->str, conn);
 
 	g_string_free (auth_header, TRUE);
 	return result;
@@ -159,10 +171,13 @@ soup_connection_auth_get_authorization (
 					SoupMessage *msg)
 {
 	SoupConnectionAuth *cauth = SOUP_CONNECTION_AUTH (auth);
+	SoupConnectionAuthClass *klass;
 	gpointer conn = soup_connection_auth_get_connection_state_for_message (cauth, msg);
 
-	return SOUP_CONNECTION_AUTH_GET_CLASS (auth)->
-		get_connection_authorization (cauth, msg, conn);
+	klass = SOUP_CONNECTION_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, NULL);
+
+	return klass->get_connection_authorization (cauth, msg, conn);
 }
 
 static gboolean
@@ -170,10 +185,13 @@ soup_connection_auth_is_ready (SoupAuth
 			       SoupMessage *msg)
 {
 	SoupConnectionAuth *cauth = SOUP_CONNECTION_AUTH (auth);
+	SoupConnectionAuthClass *klass;
 	gpointer conn = soup_connection_auth_get_connection_state_for_message (cauth, msg);
 
-	return SOUP_CONNECTION_AUTH_GET_CLASS (auth)->
-		is_connection_ready (SOUP_CONNECTION_AUTH (auth), msg, conn);
+	klass = SOUP_CONNECTION_AUTH_GET_CLASS (auth);
+	g_return_val_if_fail (klass != NULL, FALSE);
+
+	return klass->is_connection_ready (SOUP_CONNECTION_AUTH (auth), msg, conn);
 }
 
 static void
diff -up libsoup-2.62.2/libsoup/soup-content-sniffer.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-content-sniffer.c
--- libsoup-2.62.2/libsoup/soup-content-sniffer.c.coverity-scan-issues	2018-03-23 14:44:54.000000000 +0100
+++ libsoup-2.62.2/libsoup/soup-content-sniffer.c	2018-06-22 11:25:33.384294057 +0200
@@ -925,11 +925,16 @@ soup_content_sniffer_sniff (SoupContentS
 			    SoupMessage *msg, SoupBuffer *buffer,
 			    GHashTable **params)
 {
+	SoupContentSnifferClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_CONTENT_SNIFFER (sniffer), NULL);
 	g_return_val_if_fail (SOUP_IS_MESSAGE (msg), NULL);
 	g_return_val_if_fail (buffer != NULL, NULL);
 
-	return SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer)->sniff (sniffer, msg, buffer, params);
+	klass = SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer);
+	g_return_val_if_fail (klass != NULL, NULL);
+
+	return klass->sniff (sniffer, msg, buffer, params);
 }
 
 /**
@@ -946,7 +951,12 @@ soup_content_sniffer_sniff (SoupContentS
 gsize
 soup_content_sniffer_get_buffer_size (SoupContentSniffer *sniffer)
 {
+	SoupContentSnifferClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_CONTENT_SNIFFER (sniffer), 0);
 
-	return SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer)->get_buffer_size (sniffer);
+	klass = SOUP_CONTENT_SNIFFER_GET_CLASS (sniffer);
+	g_return_val_if_fail (klass != NULL, 0);
+
+	return klass->get_buffer_size (sniffer);
 }
diff -up libsoup-2.62.2/libsoup/soup-cookie-jar.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-cookie-jar.c
--- libsoup-2.62.2/libsoup/soup-cookie-jar.c.coverity-scan-issues	2018-03-23 14:44:59.000000000 +0100
+++ libsoup-2.62.2/libsoup/soup-cookie-jar.c	2018-06-22 11:25:33.385294057 +0200
@@ -888,7 +888,12 @@ soup_cookie_jar_set_accept_policy (SoupC
 gboolean
 soup_cookie_jar_is_persistent (SoupCookieJar *jar)
 {
+	SoupCookieJarClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_COOKIE_JAR (jar), FALSE);
 
-	return SOUP_COOKIE_JAR_GET_CLASS (jar)->is_persistent (jar);
+	klass = SOUP_COOKIE_JAR_GET_CLASS (jar);
+	g_return_val_if_fail (klass != NULL, FALSE);
+
+	return klass->is_persistent (jar);
 }
diff -up libsoup-2.62.2/libsoup/soup-session.c.coverity-scan-issues libsoup-2.62.2/libsoup/soup-session.c
--- libsoup-2.62.2/libsoup/soup-session.c.coverity-scan-issues	2018-04-19 15:26:33.000000000 +0200
+++ libsoup-2.62.2/libsoup/soup-session.c	2018-06-22 11:25:33.385294057 +0200
@@ -2175,11 +2175,15 @@ void
 soup_session_queue_message (SoupSession *session, SoupMessage *msg,
 			    SoupSessionCallback callback, gpointer user_data)
 {
+	SoupSessionClass *klass;
+
 	g_return_if_fail (SOUP_IS_SESSION (session));
 	g_return_if_fail (SOUP_IS_MESSAGE (msg));
 
-	SOUP_SESSION_GET_CLASS (session)->queue_message (session, msg,
-							 callback, user_data);
+	klass = SOUP_SESSION_GET_CLASS (session);
+	g_return_if_fail (klass != NULL);
+
+	klass->queue_message (session, msg, callback, user_data);
 	/* The SoupMessageQueueItem will hold a ref on @msg until it is
 	 * finished, so we can drop the ref adopted from the caller now.
 	 */
@@ -2219,10 +2223,15 @@ soup_session_real_requeue_message (SoupS
 void
 soup_session_requeue_message (SoupSession *session, SoupMessage *msg)
 {
+	SoupSessionClass *klass;
+
 	g_return_if_fail (SOUP_IS_SESSION (session));
 	g_return_if_fail (SOUP_IS_MESSAGE (msg));
 
-	SOUP_SESSION_GET_CLASS (session)->requeue_message (session, msg);
+	klass = SOUP_SESSION_GET_CLASS (session);
+	g_return_if_fail (klass != NULL);
+
+	klass->requeue_message (session, msg);
 }
 
 static guint
@@ -2266,10 +2275,15 @@ soup_session_real_send_message (SoupSess
 guint
 soup_session_send_message (SoupSession *session, SoupMessage *msg)
 {
+	SoupSessionClass *klass;
+
 	g_return_val_if_fail (SOUP_IS_SESSION (session), SOUP_STATUS_MALFORMED);
 	g_return_val_if_fail (SOUP_IS_MESSAGE (msg), SOUP_STATUS_MALFORMED);
 
-	return SOUP_SESSION_GET_CLASS (session)->send_message (session, msg);
+	klass = SOUP_SESSION_GET_CLASS (session);
+	g_return_val_if_fail (klass != NULL, SOUP_STATUS_MALFORMED);
+
+	return klass->send_message (session, msg);
 }
 
 
@@ -2350,7 +2364,14 @@ soup_session_real_kick_queue (SoupSessio
 void
 soup_session_kick_queue (SoupSession *session)
 {
-	SOUP_SESSION_GET_CLASS (session)->kick (session);
+	SoupSessionClass *klass;
+
+	g_return_if_fail (SOUP_IS_SESSION (session));
+
+	klass = SOUP_SESSION_GET_CLASS (session);
+	g_return_if_fail (klass != NULL);
+
+	klass->kick (session);
 }
 
 /**
@@ -2450,11 +2471,15 @@ soup_session_cancel_message (SoupSession
 			     guint status_code)
 {
 	SoupSessionPrivate *priv;
+	SoupSessionClass *klass;
 	SoupMessageQueueItem *item;
 
 	g_return_if_fail (SOUP_IS_SESSION (session));
 	g_return_if_fail (SOUP_IS_MESSAGE (msg));
 
+	klass = SOUP_SESSION_GET_CLASS (session);
+	g_return_if_fail (klass != NULL);
+
 	priv = soup_session_get_instance_private (session);
 	item = soup_message_queue_lookup (priv->queue, msg);
 	/* If the message is already ending, don't do anything */
@@ -2465,7 +2490,7 @@ soup_session_cancel_message (SoupSession
 		return;
 	}
 
-	SOUP_SESSION_GET_CLASS (session)->cancel_message (session, msg, status_code);
+	klass->cancel_message (session, msg, status_code);
 	soup_message_queue_item_unref (item);
 }
 
@@ -2538,15 +2563,20 @@ soup_session_real_flush_queue (SoupSessi
 void
 soup_session_abort (SoupSession *session)
 {
+	SoupSessionClass *klass;
 	SoupSessionPrivate *priv;
 	GSList *conns, *c;
 	GHashTableIter iter;
 	gpointer conn, host;
 
 	g_return_if_fail (SOUP_IS_SESSION (session));
+
+	klass = SOUP_SESSION_GET_CLASS (session);
+	g_return_if_fail (klass != NULL);
+
 	priv = soup_session_get_instance_private (session);
 
-	SOUP_SESSION_GET_CLASS (session)->flush_queue (session);
+	klass->flush_queue (session);
 
 	/* Close all idle connections */
 	g_mutex_lock (&priv->conn_lock);
