office-gobmx/liblangtag/liblangtag-0.2-0001-Fix-a-memory-leak.patch
2012-06-04 17:01:37 +02:00

44 lines
1.5 KiB
Diff

From 132170753ea9cbd63cda8f3a80498c144f75b8ba Mon Sep 17 00:00:00 2001
Message-Id: <132170753ea9cbd63cda8f3a80498c144f75b8ba.1337190143.git.erack@redhat.com>
From: Akira TAGOH <akira@tagoh.org>
Date: Mon, 6 Feb 2012 16:38:37 +0900
Subject: [PATCH] Fix a memory leak
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
This is a multi-part message in MIME format.
--------------erAck-patch-parts
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
---
liblangtag/lt-extension.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
--------------erAck-patch-parts
Content-Type: text/x-patch; name="0001-Fix-a-memory-leak.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Fix-a-memory-leak.patch"
diff --git a/liblangtag/lt-extension.c b/liblangtag/lt-extension.c
index eb84b12..466ebce 100644
--- a/liblangtag/lt-extension.c
+++ misc/build/liblangtag-0.2/liblangtag/lt-extension.c
@@ -231,8 +231,11 @@ lt_extension_copy(lt_extension_t *extension)
(lt_destroy_func_t)lt_ext_module_unref);
retval->singleton = extension->singleton;
for (i = 0; i < LT_MAX_EXT_MODULES; i++) {
- if (extension->extensions[i])
+ if (extension->extensions[i]) {
retval->extensions[i] = lt_ext_module_data_ref(extension->extensions[i]);
+ lt_mem_add_ref(&retval->parent, retval->extensions[i],
+ (lt_destroy_func_t)lt_ext_module_data_unref);
+ }
}
}
}
--------------erAck-patch-parts--