summaryrefslogtreecommitdiff
path: root/libebackend/e-source-registry-server.c
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2014-11-01 14:16:52 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2014-11-08 22:48:39 +0000
commit3b90f87ebe6aa506cbd923a22ce1a39d57c85273 (patch)
tree2c72ba7fad387c2cb657ed4d58f8c14660191333 /libebackend/e-source-registry-server.c
parent85e9a2fd7fbdfc1d14676e7436201852b08e4139 (diff)
downloadevolution-data-server-3b90f87ebe6aa506cbd923a22ce1a39d57c85273.tar.gz
e-source-registry-server: Fix a potential NULL pointer dereference
On the code path where backend is NULL, error is always NULL, so dereferencing error->message will result in a crash. Coverity issue: #1250457 https://bugzilla.gnome.org/show_bug.cgi?id=739494
Diffstat (limited to 'libebackend/e-source-registry-server.c')
-rw-r--r--libebackend/e-source-registry-server.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libebackend/e-source-registry-server.c b/libebackend/e-source-registry-server.c
index 2e7230420..7e82e5256 100644
--- a/libebackend/e-source-registry-server.c
+++ b/libebackend/e-source-registry-server.c
@@ -1179,7 +1179,8 @@ source_registry_server_source_added (ESourceRegistryServer *server,
} else {
g_warning (
"No collection backend '%s' for %s: %s",
- backend_name, e_source_get_uid (source), error->message);
+ backend_name, e_source_get_uid (source),
+ error ? error->message : "Unknown error");
g_clear_error (&error);
}