[libgxps] archive: do not leak the stream
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] archive: do not leak the stream
- Date: Tue, 17 Jan 2017 14:25:47 +0000 (UTC)
commit fe2425e38cbb01f01dcbf2095a3e582947d37003
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Jan 17 09:42:57 2017 +0100
archive: do not leak the stream
libgxps/gxps-archive.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libgxps/gxps-archive.c b/libgxps/gxps-archive.c
index 6073659..c142b1b 100644
--- a/libgxps/gxps-archive.c
+++ b/libgxps/gxps-archive.c
@@ -431,10 +431,11 @@ gxps_archive_read_entry (GXPSArchive *archive,
*bytes_read += bytes;
} while (bytes > 0);
+ g_object_unref (stream);
+
if (*bytes_read == 0) {
/* TODO: Error */
g_free (*buffer);
- g_object_unref (stream);
return FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]