[evolution-data-server] Bug #721030 - WebDAV: download_contacts() leaks
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #721030 - WebDAV: download_contacts() leaks
- Date: Tue, 4 Feb 2014 18:37:41 +0000 (UTC)
commit 9cfc619b5294c79921475a5ef805198ec4257b07
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 976bebc..772618c 100644
--- a/addressbook/backends/webdav/e-book-backend-webdav.c
+++ b/addressbook/backends/webdav/e-book-backend-webdav.c
@@ -887,6 +887,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);
@@ -906,6 +907,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);
@@ -917,6 +920,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]