[libgsf] GsfInputMemory: plug leak.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgsf] GsfInputMemory: plug leak.
- Date: Sat, 1 Nov 2014 15:14:00 +0000 (UTC)
commit 8fa35e86d9f3626f9447f0fc8e23cc2c91a0dc10
Author: Morten Welinder <terra gnome org>
Date: Sat Nov 1 11:13:37 2014 -0400
GsfInputMemory: plug leak.
ChangeLog | 2 ++
gsf/gsf-input-memory.c | 3 +--
2 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 675a955..1dd525a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
2014-11-01 Morten Welinder <terra gnome org>
+ * gsf/gsf-input-memory.c (gsf_input_mmap_new): Plug leak.
+
* gsf/gsf-infile-msvba.c (vba_dir_read): Plug leak.
* gsf/gsf-structured-blob.c (blob_finalize, blob_dup)
diff --git a/gsf/gsf-input-memory.c b/gsf/gsf-input-memory.c
index c059de2..7b4479f 100644
--- a/gsf/gsf-input-memory.c
+++ b/gsf/gsf-input-memory.c
@@ -206,8 +206,6 @@ gsf_input_mmap_new (char const *filename, GError **err)
int fd;
size_t size;
- mem = g_object_new (GSF_INPUT_MEMORY_TYPE, NULL);
-
fd = g_open (filename, O_RDONLY | O_BINARY, 0);
if (fd < 0 || fstat (fd, &st) < 0) {
if (err != NULL) {
@@ -270,6 +268,7 @@ gsf_input_mmap_new (char const *filename, GError **err)
return NULL;
}
+ mem = g_object_new (GSF_INPUT_MEMORY_TYPE, NULL);
mem->shared = gsf_shared_memory_mmapped_new (buf, (gsf_off_t) size);
gsf_input_set_size (GSF_INPUT (mem), (gsf_off_t) size);
gsf_input_set_name (GSF_INPUT (mem), filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]