[evolution-ews/gnome-3-16] Correct locking in e_book_backend_ews_set_locale()



commit e174d0e81cc822af454bd2b9489379542d9854bf
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 15 08:31:56 2015 +0200

    Correct locking in e_book_backend_ews_set_locale()

 src/addressbook/e-book-backend-ews.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/src/addressbook/e-book-backend-ews.c b/src/addressbook/e-book-backend-ews.c
index b6dd417..bde1b0b 100644
--- a/src/addressbook/e-book-backend-ews.c
+++ b/src/addressbook/e-book-backend-ews.c
@@ -4284,8 +4284,10 @@ e_book_backend_ews_set_locale (EBookBackend *backend,
 
        PRIV_LOCK (ebews->priv);
 
-       if (!e_book_sqlite_lock (ebews->priv->summary, EBSQL_LOCK_WRITE, cancellable, error))
+       if (!e_book_sqlite_lock (ebews->priv->summary, EBSQL_LOCK_WRITE, cancellable, error)) {
+               PRIV_UNLOCK (ebews->priv);
                return FALSE;
+       }
 
        if (e_book_sqlite_set_locale (ebews->priv->summary, locale, cancellable, error) &&
            ebews_bump_revision (ebews, error))
@@ -4307,7 +4309,7 @@ e_book_backend_ews_set_locale (EBookBackend *backend,
                        cursor, NULL, cancellable, error);
        }
 
-       PRIV_LOCK (ebews->priv);
+       PRIV_UNLOCK (ebews->priv);
 
        return success;
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]