Ubuntu One widget library

Merge lp:~dobey/libubuntuone/navigation-leak into lp:libubuntuone

Proposed by Rodney Dawes on 2011-03-11
Status: Merged
Approved by: John O'Brien on 2011-03-11
Approved revision: 123
Merged at revision: 123
Proposed branch: lp:~dobey/libubuntuone/navigation-leak
Merge into: lp:libubuntuone
Diff against target: 54 lines (+6/-5) 1 file modified
To merge this branch: bzr merge lp:~dobey/libubuntuone/navigation-leak
Reviewer Review Type Date Requested Status
John O'Brien (community) Approve on 2011-03-11
Roberto Alsina 2011-03-11 Approve on 2011-03-11
Review via email: mp+53022@code.launchpad.net

Commit Message

Use a boolean variable to ensure parsed_uri gets freed

To post a comment you must log in.
Roberto Alsina (ralsina) wrote :

+1

review: Approve
John O'Brien (jdobrien) wrote :

Looks good.

review: Approve

Preview Diff

1=== modified file 'libubuntuone/u1-music-store.c'
2--- libubuntuone/u1-music-store.c 2011-03-10 19:08:31 +0000
3+++ libubuntuone/u1-music-store.c 2011-03-11 14:29:41 +0000
4@@ -503,6 +503,7 @@
5 U1MusicStore *music_store = U1_MUSIC_STORE (user_data);
6 SoupURI *parsed_uri;
7 gchar *internal_uri;
8+ gboolean return_val = FALSE;
9
10 /* Remove watching callback for the page */
11 if (music_store->priv->watch_id != 0) {
12@@ -542,7 +543,7 @@
13 g_debug ("overriding the library page to ours");
14 load_delayed_page (web_view, library_override, policy_decision);
15
16- return TRUE;
17+ return_val = TRUE;
18 }
19 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "www.7digital.com")) {
20 /* host is 7digital.com. It must be in our store. */
21@@ -561,7 +562,7 @@
22 g_free (internal_uri);
23 g_free (to_and_from_error_uris);
24
25- return TRUE;
26+ return_val = TRUE;
27 }
28 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "one.ubuntu.com")) {
29 /* host is one.ubuntu.com. It must not be the login page */
30@@ -588,7 +589,7 @@
31 g_free (internal_uri);
32 g_free (to_and_from_error_uris);
33
34- return TRUE;
35+ return_val = TRUE;
36 }
37 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "login.ubuntu.com")) {
38 gchar *real_url;
39@@ -613,13 +614,13 @@
40 g_free (internal_uri);
41 g_free (to_and_from_error_uris);
42
43- return TRUE;
44+ return_val = TRUE;
45 }
46
47 /* Free memory */
48 soup_uri_free (parsed_uri);
49
50- return FALSE;
51+ return return_val;
52 }
53
54 static void

Subscribers

People subscribed via source and target branches