Merge lp:~charlesk/libindicate/lp-1026722 into lp:libindicate/12.10

Proposed by Charles Kerr
Status: Merged
Merged at revision: 459
Proposed branch: lp:~charlesk/libindicate/lp-1026722
Merge into: lp:libindicate/12.10
Diff against target: 126 lines (+18/-44)
3 files modified
libindicate/indicator.c (+3/-1)
libindicate/listener.c (+5/-20)
libindicate/server.c (+10/-23)
To merge this branch: bzr merge lp:~charlesk/libindicate/lp-1026722
Reviewer Review Type Date Requested Status
jenkins (community) continuous-integration Needs Fixing
Lars Karlitski (community) Approve
Review via email: mp+115796@code.launchpad.net
To post a comment you must log in.
Revision history for this message
jenkins (martin-mrazik+qa) wrote :

PASSED: Continuous integration, rev:459
http://s-jenkins:8080/job/libindicate-ci/2/
Executed test runs:
    SUCCESS: http://s-jenkins:8080/job/libindicate-ci/./label=precise/2/console

review: Approve (continuous-integration)
Revision history for this message
Lars Karlitski (larsu) wrote :

Nice!

The only thing I'd add is a NULL check for `proxy_data` in listener.c:proxy_data_destroy. But you're probably sure that it is never NULL.

review: Approve
Revision history for this message
jenkins (martin-mrazik+qa) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/libindicate-autolanding/1/

review: Needs Fixing (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :

FAILED: Continuous integration, rev:459
http://s-jenkins:8080/job/libindicate-ci/3/
Executed test runs:
    FAILURE: http://s-jenkins:8080/job/libindicate-ci/./label=precise/3/console

review: Needs Fixing (continuous-integration)
Revision history for this message
jenkins (martin-mrazik+qa) wrote :

PASSED: Continuous integration, rev:459
http://s-jenkins:8080/job/libindicate-ci/4/
Executed test runs:
    SUCCESS: http://s-jenkins:8080/job/libindicate-ci/./label=precise/4/console

review: Approve (continuous-integration)
Revision history for this message
Martin Mrazik (mrazik) wrote :

I hope I fixed the errors above. This MP will however not land as there is no commit message specified.

lp:~charlesk/libindicate/lp-1026722 updated
460. By Charles Kerr

In indicate_server_finalize(), fix a memory leak by being sure to free the icon_theme string

Revision history for this message
jenkins (martin-mrazik+qa) wrote :

FAILED: Continuous integration, rev:460
http://s-jenkins:8080/job/libindicate-ci/5/
Executed test runs:
    FAILURE: http://s-jenkins:8080/job/libindicate-ci/./label=precise/5/console

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libindicate/indicator.c'
2--- libindicate/indicator.c 2012-07-11 17:56:30 +0000
3+++ libindicate/indicator.c 2012-07-20 14:58:21 +0000
4@@ -201,6 +201,8 @@
5 IndicateIndicator * indicator = INDICATE_INDICATOR(obj);
6 IndicateIndicatorPrivate * priv = INDICATE_INDICATOR_GET_PRIVATE(indicator);
7
8+ g_hash_table_destroy (priv->properties);
9+
10 indicate_server_remove_indicator(priv->server, indicator);
11 g_object_unref(priv->server);
12 priv->server = NULL;
13@@ -568,7 +570,7 @@
14
15 gchar * newkey = g_strdup(key);
16 if (data != NULL) {
17- g_variant_ref(data);
18+ g_variant_ref_sink(data);
19 }
20
21 g_hash_table_replace(priv->properties, newkey, data);
22
23=== modified file 'libindicate/listener.c'
24--- libindicate/listener.c 2012-03-19 20:29:13 +0000
25+++ libindicate/listener.c 2012-07-20 14:58:21 +0000
26@@ -486,21 +486,10 @@
27 proxy_data->dbus_listener_sub = 0;
28 }
29
30- if (proxy_data->proxy != NULL) {
31- g_object_unref(G_OBJECT(proxy_data->proxy));
32- }
33-
34- if (proxy_data->name != NULL) {
35- g_free(proxy_data->name);
36- }
37-
38- if (proxy_data->path != NULL) {
39- g_free(proxy_data->path);
40- }
41-
42- if (proxy_data->type != NULL) {
43- g_free(proxy_data->type);
44- }
45+ g_clear_object(&proxy_data->proxy);
46+ g_free(proxy_data->name);
47+ g_free(proxy_data->path);
48+ g_free(proxy_data->type);
49 g_free(proxy_data);
50
51 return;
52@@ -761,11 +750,7 @@
53 }
54
55 proxy_t * proxyt = (proxy_t *)data;
56-
57- if (proxyt->type != NULL) {
58- g_free(proxyt->type);
59- proxyt->type = NULL;
60- }
61+ g_free (proxyt->type);
62 proxyt->type = g_strdup(type);
63
64 return;
65
66=== modified file 'libindicate/server.c'
67--- libindicate/server.c 2012-04-22 15:20:33 +0000
68+++ libindicate/server.c 2012-07-20 14:58:21 +0000
69@@ -586,15 +586,10 @@
70 IndicateServer * server = INDICATE_SERVER(obj);
71 IndicateServerPrivate * priv = INDICATE_SERVER_GET_PRIVATE(server);
72
73- if (priv->path) {
74- g_free(priv->path);
75- }
76- if (priv->desktop) {
77- g_free(priv->desktop);
78- }
79- if (priv->type) {
80- g_free(priv->type);
81- }
82+ g_free(priv->path);
83+ g_free(priv->desktop);
84+ g_free(priv->type);
85+ g_free(priv->icon_theme);
86
87 G_OBJECT_CLASS (indicate_server_parent_class)->finalize (obj);
88
89@@ -609,15 +604,11 @@
90 IndicateServerPrivate * priv = INDICATE_SERVER_GET_PRIVATE(obj);
91 switch (id) {
92 case PROP_DESKTOP:
93- if (priv->desktop != NULL) {
94- g_free(priv->desktop);
95- }
96+ g_free(priv->desktop);
97 priv->desktop = g_value_dup_string(value);
98 break;
99 case PROP_TYPE:
100- if (priv->type != NULL) {
101- g_free(priv->type);
102- }
103+ g_free(priv->type);
104 priv->type = g_value_dup_string(value);
105 break;
106 case PROP_COUNT: {
107@@ -638,15 +629,11 @@
108 break;
109 }
110 case PROP_PATH:
111- if (priv->path != NULL) {
112- g_free(priv->path);
113- }
114- priv->path = g_value_dup_string(value);
115- break;
116+ g_free(priv->path);
117+ priv->path = g_value_dup_string(value);
118+ break;
119 case PROP_ICON_THEME:
120- if (priv->icon_theme != NULL) {
121- g_free (priv->icon_theme);
122- }
123+ g_free (priv->icon_theme);
124 priv->icon_theme = g_value_dup_string(value);
125 break;
126 default:

Subscribers

People subscribed via source and target branches