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