[librsvg] Don't leak the input stream
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg] Don't leak the input stream
- Date: Tue, 22 Jun 2010 16:21:19 +0000 (UTC)
commit 9afcac622199e08ce87153b8ec3b5801573075ff
Author: Christian Persch <chpe gnome org>
Date: Tue Jun 22 18:19:55 2010 +0200
Don't leak the input stream
... if the handle is finalised without close having been called.
rsvg-gobject.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/rsvg-gobject.c b/rsvg-gobject.c
index 37bbde2..42793fe 100644
--- a/rsvg-gobject.c
+++ b/rsvg-gobject.c
@@ -127,6 +127,10 @@ instance_dispose (GObject * instance)
g_object_unref (self->priv->base_gfile);
self->priv->base_gfile = NULL;
}
+ if (self->priv->data_input_stream) {
+ g_object_unref (self->priv->data_input_stream);
+ self->priv->data_input_stream = NULL;
+ }
#elif defined(HAVE_GSF)
if (self->priv->gzipped_data) {
g_object_unref (self->priv->gzipped_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]