[evolution-data-server] Fix a memory leak in ebmb_gather_photos_local_filenames()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix a memory leak in ebmb_gather_photos_local_filenames()
- Date: Tue, 14 Jul 2020 16:04:07 +0000 (UTC)
commit 473b41ef6ce28b2d07b76c60854f7779a785f5f8
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 14 18:04:04 2020 +0200
Fix a memory leak in ebmb_gather_photos_local_filenames()
src/addressbook/libedata-book/e-book-meta-backend.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/src/addressbook/libedata-book/e-book-meta-backend.c
b/src/addressbook/libedata-book/e-book-meta-backend.c
index ea79511fe..3cce96420 100644
--- a/src/addressbook/libedata-book/e-book-meta-backend.c
+++ b/src/addressbook/libedata-book/e-book-meta-backend.c
@@ -521,7 +521,7 @@ ebmb_gather_photos_local_filenames (EBookMetaBackend *meta_backend,
values = e_vcard_attribute_get_param (attr, EVC_VALUE);
if (values && g_ascii_strcasecmp (values->data, "uri") == 0) {
- const gchar *url;
+ gchar *url;
url = e_vcard_attribute_get_value (attr);
if (url && g_str_has_prefix (url, LOCAL_PREFIX)) {
@@ -533,6 +533,8 @@ ebmb_gather_photos_local_filenames (EBookMetaBackend *meta_backend,
else
g_free (filename);
}
+
+ g_free (url);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]