[evolution-data-server/gnome-3-10] Bug #721030 - WebDAV: download_contacts() leaks
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-10] Bug #721030 - WebDAV: download_contacts() leaks
- Date: Tue, 4 Feb 2014 18:38:37 +0000 (UTC)
commit 17535c965b73e2b1f1bb3a428fcd9ff6a1bb3354
Author: Michel Dänzer <michel daenzer net>
Date: Tue Feb 4 19:37:20 2014 +0100
Bug #721030 - WebDAV: download_contacts() leaks
.../backends/webdav/e-book-backend-webdav.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/backends/webdav/e-book-backend-webdav.c
b/addressbook/backends/webdav/e-book-backend-webdav.c
index 59b4818..a0b043d 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -892,6 +892,7 @@ download_contacts (EBookBackendWebdav *webdav,
/* uri might be relative, construct complete one */
if (uri[0] == '/') {
SoupURI *soup_uri = soup_uri_new (priv->uri);
+ g_free (soup_uri->path);
soup_uri->path = g_strdup (uri);
complete_uri = soup_uri_to_string (soup_uri, FALSE);
@@ -911,6 +912,8 @@ download_contacts (EBookBackendWebdav *webdav,
/* download contact if it is not cached or its ETag changed */
if (contact == NULL || etag == NULL || !stored_etag ||
strcmp (stored_etag, etag) != 0) {
+ if (contact != NULL)
+ g_object_unref (contact);
contact = download_contact (webdav, complete_uri, cancellable);
if (contact != NULL) {
g_mutex_lock (&priv->cache_lock);
@@ -922,6 +925,8 @@ download_contacts (EBookBackendWebdav *webdav,
}
}
+ if (contact != NULL)
+ g_object_unref (contact);
g_free (complete_uri);
g_free (stored_etag);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]