[eog] Plug a leak in EogImage
- From: Claudio Saavedra <csaavedra src gnome org>
- To: svn-commits-list gnome org
- Subject: [eog] Plug a leak in EogImage
- Date: Sun, 26 Apr 2009 04:47:33 -0400 (EDT)
commit cb1e01983a6b273ba65b57449e5ab5f13c448658
Author: Claudio Saavedra <csaavedra igalia com>
Date: Sun Apr 26 11:44:43 2009 +0300
Plug a leak in EogImage
* src/eog-image.c: (eog_image_set_exif_data): Unref the EXIF
data before setting it, to avoid leaking it in case it is loaded
more than once.
---
ChangeLog | 6 ++++++
src/eog-image.c | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index d9acf3f..9e8720a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-04-26 Claudio Saavedra <csaavedra igalia com>
+
+ * src/eog-image.c: (eog_image_set_exif_data): Unref the EXIF
+ data before setting it, to avoid leaking it in case it is loaded
+ more than once.
+
2009-04-24 Felix Riemann <friemann svn gnome org>
* src/eog-image-jpeg.h:
diff --git a/src/eog-image.c b/src/eog-image.c
index 840dd0c..f4a846f 100644
--- a/src/eog-image.c
+++ b/src/eog-image.c
@@ -751,6 +751,9 @@ eog_image_set_exif_data (EogImage *img, EogMetadataReader *md_reader)
priv = img->priv;
#ifdef HAVE_EXIF
+ if (priv->exif) {
+ exif_data_unref (priv->exif);
+ }
priv->exif = eog_metadata_reader_get_exif_data (md_reader);
priv->exif_chunk = NULL;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]