Merge lp:~3v1n0/libindicator/fix-crash-969360 into lp:libindicator/0.5

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Tim Penhey
Approved revision: 462
Merged at revision: 461
Proposed branch: lp:~3v1n0/libindicator/fix-crash-969360
Merge into: lp:libindicator/0.5
Diff against target: 23 lines (+2/-5)
1 file modified
libindicator/indicator-service-manager.c (+2/-5)
To merge this branch: bzr merge lp:~3v1n0/libindicator/fix-crash-969360
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+100346@code.launchpad.net

Description of the change

When using g_variant_get("&s...", &string), the string must not be free'd.

See: http://is.gd/EyhAhP

To post a comment you must log in.
462. By Marco Trevisan (Treviño)

Setting again the variables as const

Revision history for this message
Tim Penhey (thumper) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libindicator/indicator-service-manager.c'
2--- libindicator/indicator-service-manager.c 2012-03-16 20:39:11 +0000
3+++ libindicator/indicator-service-manager.c 2012-04-01 19:06:19 +0000
4@@ -536,8 +536,8 @@
5 {
6 IndicatorServiceManagerPrivate * priv = INDICATOR_SERVICE_MANAGER_GET_PRIVATE(user_data);
7
8- gchar * new_name = NULL;
9- gchar * prev_name = NULL;
10+ const gchar * new_name = NULL;
11+ const gchar * prev_name = NULL;
12 g_variant_get(parameters, "(&s&s&s)", NULL, &prev_name, &new_name);
13
14 if (new_name == NULL || new_name[0] == 0) {
15@@ -571,9 +571,6 @@
16 }
17 }
18
19- g_free (new_name);
20- g_free (prev_name);
21-
22 return;
23 }
24

Subscribers

People subscribed via source and target branches