[libgsf] zip: plug leak.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] zip: plug leak.
- Date: Sun, 1 Feb 2015 23:59:34 +0000 (UTC)
commit f577b3682fffe3b6308732a2526d430b56caf338
Author: Morten Welinder <terra gnome org>
Date: Sun Feb 1 18:59:23 2015 -0500
zip: plug leak.
ChangeLog | 4 ++++
gsf/gsf-infile-zip.c | 3 +--
gsf/gsf-infile.c | 4 ++--
3 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index a547a7e..d7b636f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-02-01 Morten Welinder <terra gnome org>
+
+ * gsf/gsf-infile.c (gsf_infile_child_by_vaname): Fix age-old leak.
+
2015-01-25 Andreas J. Guelzow <aguelzow pyrshep ca>
* gsf/gsf-opendoc-utils.c (gsf_ooo_ns): add 2 new localc namespaces
diff --git a/gsf/gsf-infile-zip.c b/gsf/gsf-infile-zip.c
index e1d638f..84cbbe9 100644
--- a/gsf/gsf-infile-zip.c
+++ b/gsf/gsf-infile-zip.c
@@ -709,7 +709,6 @@ gsf_infile_zip_seek (GsfInput *input, gsf_off_t offset, GSeekType whence)
/*****************************************************************************/
-
static GsfInput *
gsf_infile_zip_new_child (GsfInfileZip *parent, GsfZipVDir *vdir, GError **err)
{
@@ -827,6 +826,7 @@ gsf_infile_zip_finalize (GObject *obj)
parent_class->finalize (obj);
}
+
static GObject*
gsf_infile_zip_constructor (GType type,
guint n_construct_properties,
@@ -851,7 +851,6 @@ gsf_infile_zip_constructor (GType type,
return (GObject *)zip;
}
-
static void
gsf_infile_zip_init (GObject *obj)
{
diff --git a/gsf/gsf-infile.c b/gsf/gsf-infile.c
index bf01f37..99822bc 100644
--- a/gsf/gsf-infile.c
+++ b/gsf/gsf-infile.c
@@ -167,10 +167,10 @@ gsf_infile_child_by_vaname (GsfInfile *infile, va_list names)
while (NULL != (name = va_arg (names, char const *))) {
child = gsf_infile_child_by_name (infile, name);
- if (child == NULL)
- break;
if (tmp != NULL)
g_object_unref (tmp);
+ if (child == NULL)
+ break;
g_return_val_if_fail (GSF_IS_INFILE (child), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]