Merge lp:~indicator-applet-developers/indicator-application/ubuntu into lp:~ubuntu-desktop/indicator-application/ubuntu

Proposed by Ted Gould
Status: Merged
Merged at revision: 274
Proposed branch: lp:~indicator-applet-developers/indicator-application/ubuntu
Merge into: lp:~ubuntu-desktop/indicator-application/ubuntu
Diff against target: 229 lines (+78/-14)
5 files modified
ChangeLog (+24/-0)
configure (+10/-10)
configure.ac (+2/-2)
debian/changelog (+7/-0)
src/application-service-appstore.c (+35/-2)
To merge this branch: bzr merge lp:~indicator-applet-developers/indicator-application/ubuntu
Reviewer Review Type Date Requested Status
Ken VanDine Pending
Review via email: mp+77347@code.launchpad.net

Description of the change

Mem leak

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-08-11 16:54:27 +0000
3+++ ChangeLog 2011-09-28 15:30:47 +0000
4@@ -1,5 +1,29 @@
5 # Generated by Makefile. Do not edit.
6
7+2011-09-28 Ted Gould <ted@gould.cx>
8+
9+ 0.4.0
10+
11+2011-09-16 Ted Gould <ted@gould.cx>
12+
13+ Memory leaks on double calls for properties
14+
15+2011-09-16 Ted Gould <ted@gould.cx>
16+
17+ Pulling in mterry's additional fixes
18+
19+2011-09-16 Michael Terry <michael.terry@canonical.com>
20+
21+ free application fields before resetting them to new values
22+
23+2011-09-16 Ted Gould <ted@gould.cx>
24+
25+ Ensure we set a default value for aicon
26+
27+2011-09-14 Ted Gould <ted@gould.cx>
28+
29+ Freeing properties on second run of building the app indicator
30+
31 2011-08-11 Ted Gould <ted@gould.cx>
32
33 0.3.92
34
35=== modified file 'configure'
36--- configure 2011-08-11 16:55:25 +0000
37+++ configure 2011-09-28 15:30:47 +0000
38@@ -1,6 +1,6 @@
39 #! /bin/sh
40 # Guess values for system-dependent variables and create Makefiles.
41-# Generated by GNU Autoconf 2.68 for indicator-application 0.3.92.
42+# Generated by GNU Autoconf 2.68 for indicator-application 0.4.0.
43 #
44 # Report bugs to <ted@canonical.com>.
45 #
46@@ -572,8 +572,8 @@
47 # Identity of this package.
48 PACKAGE_NAME='indicator-application'
49 PACKAGE_TARNAME='indicator-application'
50-PACKAGE_VERSION='0.3.92'
51-PACKAGE_STRING='indicator-application 0.3.92'
52+PACKAGE_VERSION='0.4.0'
53+PACKAGE_STRING='indicator-application 0.4.0'
54 PACKAGE_BUGREPORT='ted@canonical.com'
55 PACKAGE_URL=''
56
57@@ -1317,7 +1317,7 @@
58 # Omit some internal or obsolete options to make the list less imposing.
59 # This message is too long to be a string in the A/UX 3.1 sh.
60 cat <<_ACEOF
61-\`configure' configures indicator-application 0.3.92 to adapt to many kinds of systems.
62+\`configure' configures indicator-application 0.4.0 to adapt to many kinds of systems.
63
64 Usage: $0 [OPTION]... [VAR=VALUE]...
65
66@@ -1388,7 +1388,7 @@
67
68 if test -n "$ac_init_help"; then
69 case $ac_init_help in
70- short | recursive ) echo "Configuration of indicator-application 0.3.92:";;
71+ short | recursive ) echo "Configuration of indicator-application 0.4.0:";;
72 esac
73 cat <<\_ACEOF
74
75@@ -1509,7 +1509,7 @@
76 test -n "$ac_init_help" && exit $ac_status
77 if $ac_init_version; then
78 cat <<\_ACEOF
79-indicator-application configure 0.3.92
80+indicator-application configure 0.4.0
81 generated by GNU Autoconf 2.68
82
83 Copyright (C) 2010 Free Software Foundation, Inc.
84@@ -1789,7 +1789,7 @@
85 This file contains any messages produced by compilers while
86 running configure, to aid debugging if configure makes a mistake.
87
88-It was created by indicator-application $as_me 0.3.92, which was
89+It was created by indicator-application $as_me 0.4.0, which was
90 generated by GNU Autoconf 2.68. Invocation command line was
91
92 $ $0 $@
93@@ -2610,7 +2610,7 @@
94
95 # Define the identity of the package.
96 PACKAGE=indicator-application
97- VERSION=0.3.92
98+ VERSION=0.4.0
99
100
101 cat >>confdefs.h <<_ACEOF
102@@ -13365,7 +13365,7 @@
103 # report actual input values of CONFIG_FILES etc. instead of their
104 # values after options handling.
105 ac_log="
106-This file was extended by indicator-application $as_me 0.3.92, which was
107+This file was extended by indicator-application $as_me 0.4.0, which was
108 generated by GNU Autoconf 2.68. Invocation command line was
109
110 CONFIG_FILES = $CONFIG_FILES
111@@ -13431,7 +13431,7 @@
112 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
113 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
114 ac_cs_version="\\
115-indicator-application config.status 0.3.92
116+indicator-application config.status 0.4.0
117 configured by $0, generated by GNU Autoconf 2.68,
118 with options \\"\$ac_cs_config\\"
119
120
121=== modified file 'configure.ac'
122--- configure.ac 2011-08-11 16:51:43 +0000
123+++ configure.ac 2011-09-28 15:30:47 +0000
124@@ -1,11 +1,11 @@
125
126-AC_INIT(indicator-application, 0.3.92, ted@canonical.com)
127+AC_INIT(indicator-application, 0.4.0, ted@canonical.com)
128 AC_COPYRIGHT([Copyright 2009, 2010 Canonical])
129
130 AC_PREREQ(2.53)
131
132 AM_CONFIG_HEADER(config.h)
133-AM_INIT_AUTOMAKE(indicator-application, 0.3.92)
134+AM_INIT_AUTOMAKE(indicator-application, 0.4.0)
135
136 AM_MAINTAINER_MODE
137
138
139=== modified file 'debian/changelog'
140--- debian/changelog 2011-08-11 19:48:49 +0000
141+++ debian/changelog 2011-09-28 15:30:47 +0000
142@@ -1,3 +1,10 @@
143+indicator-application (0.4.0-0ubuntu1~ppa1) oneiric; urgency=low
144+
145+ * New upstream release.
146+ * Fix memory leak (LP: #829961)
147+
148+ -- Ted Gould <ted@ubuntu.com> Wed, 28 Sep 2011 10:02:11 -0500
149+
150 indicator-application (0.3.92-0ubuntu1) oneiric; urgency=low
151
152 * debian/rules:
153
154=== modified file 'src/application-service-appstore.c'
155--- src/application-service-appstore.c 2011-08-11 16:55:25 +0000
156+++ src/application-service-appstore.c 2011-09-28 15:30:47 +0000
157@@ -508,6 +508,14 @@
158 else {
159 app->validated = TRUE;
160
161+ /* It is possible we're coming through a second time and
162+ getting the properties. So we need to ensure we don't
163+ already have them stored */
164+ g_free(app->id);
165+ g_free(app->category);
166+ g_free(app->icon);
167+ g_free(app->menu);
168+
169 app->id = g_variant_dup_string(id, NULL);
170 app->category = g_variant_dup_string(category, NULL);
171 app->status = string_to_status(g_variant_get_string(status, NULL));
172@@ -516,10 +524,30 @@
173
174 /* Now the optional properties */
175
176+ g_free(app->icon_desc);
177+ if (icon_desc != NULL) {
178+ app->icon_desc = g_variant_dup_string(icon_desc, NULL);
179+ }
180+ else {
181+ app->icon_desc = g_strdup("");
182+ }
183+
184+ g_free(app->aicon);
185 if (aicon_name != NULL) {
186 app->aicon = g_variant_dup_string(aicon_name, NULL);
187- }
188-
189+ } else {
190+ app->aicon = g_strdup("");
191+ }
192+
193+ g_free(app->aicon_desc);
194+ if (aicon_desc != NULL) {
195+ app->aicon_desc = g_variant_dup_string(aicon_desc, NULL);
196+ }
197+ else {
198+ app->aicon_desc = g_strdup("");
199+ }
200+
201+ g_free(app->icon_theme_path);
202 if (icon_theme_path != NULL) {
203 app->icon_theme_path = g_variant_dup_string(icon_theme_path, NULL);
204 } else {
205@@ -539,12 +567,14 @@
206 g_debug("'%s' ordering index is '%X'", app->id, app->ordering_index);
207 app->appstore->priv->applications = g_list_sort_with_data(app->appstore->priv->applications, app_sort_func, NULL);
208
209+ g_free(app->label);
210 if (label != NULL) {
211 app->label = g_variant_dup_string(label, NULL);
212 } else {
213 app->label = g_strdup("");
214 }
215
216+ g_free(app->guide);
217 if (guide != NULL) {
218 app->guide = g_variant_dup_string(guide, NULL);
219 } else {
220@@ -736,6 +766,9 @@
221 if (app->icon_desc != NULL) {
222 g_free(app->icon_desc);
223 }
224+ if (app->aicon != NULL) {
225+ g_free(app->aicon);
226+ }
227 if (app->aicon_desc != NULL) {
228 g_free(app->aicon_desc);
229 }

Subscribers

People subscribed via source and target branches

to all changes: