[evolution-ews/gnome-3-16] Address some of the Coverity Scan issues
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews/gnome-3-16] Address some of the Coverity Scan issues
- Date: Fri, 22 May 2015 11:48:07 +0000 (UTC)
commit 8273f68458724311ab442ec4b9f8f385c35635a0
Author: Milan Crha <mcrha redhat com>
Date: Fri May 22 13:46:21 2015 +0200
Address some of the Coverity Scan issues
src/addressbook/e-book-backend-ews.c | 5 ++++-
src/addressbook/ews-oab-decoder.c | 2 +-
src/server/e-ews-folder.c | 2 +-
src/server/e-ews-notification.c | 2 +-
4 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index bde1b0b..c4caca4 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -2757,7 +2757,10 @@ ebews_start_gal_sync (gpointer data)
if (!ret)
goto exit;
- e_book_sqlite_set_key_value (priv->summary, "etag", etag ? etag : "", NULL);
+ ret = e_book_sqlite_set_key_value (priv->summary, "etag", etag ? etag : "", NULL);
+ if (!ret)
+ goto exit;
+
if (e_book_sqlite_set_key_value (priv->summary, "oab-filename",
uncompressed_filename, NULL)) {
/* Don't let it get deleted */
diff --git a/src/addressbook/ews-oab-decoder.c b/src/addressbook/ews-oab-decoder.c
index d819ed2..2d59ba9 100644
--- a/src/addressbook/ews-oab-decoder.c
+++ b/src/addressbook/ews-oab-decoder.c
@@ -956,7 +956,7 @@ exit:
if (!contact)
return ret;
- if (dset->addr) {
+ if (dset && dset->addr) {
e_contact_set (contact, E_CONTACT_ADDRESS_WORK, dset->addr);
e_contact_address_free (dset->addr);
}
diff --git a/src/server/e-ews-folder.c b/src/server/e-ews-folder.c
index 3a7e42c..aecce5c 100644
--- a/src/server/e-ews-folder.c
+++ b/src/server/e-ews-folder.c
@@ -521,7 +521,7 @@ e_ews_folder_utils_escape_name (const gchar *folder_name)
if (!count)
return g_strdup (folder_name);
- res = g_malloc0 (sizeof (gchar *) * (1 + ii + (2 * count)));
+ res = g_malloc0 (sizeof (gchar) * (1 + ii + (2 * count)));
for (ii = 0, jj = 0; folder_name[ii]; ii++, jj++) {
if (folder_name[ii] == '\\') {
res[jj] = '\\';
diff --git a/src/server/e-ews-notification.c b/src/server/e-ews-notification.c
index db57d2a..4576f88 100644
--- a/src/server/e-ews-notification.c
+++ b/src/server/e-ews-notification.c
@@ -148,7 +148,7 @@ static EEwsConnection *
e_ews_notification_get_connection (const EEwsNotification *notification)
{
g_return_val_if_fail (E_IS_EWS_NOTIFICATION (notification), NULL);
- g_return_val_if_fail (notification->priv == NULL, NULL);
+ g_return_val_if_fail (notification->priv != NULL, NULL);
return notification->priv->connection;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]