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

Proposed by dobey
Status: Merged
Approved by: John O'Brien
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
libubuntuone/u1-music-store.c (+6/-5)
To merge this branch: bzr merge lp:~dobey/libubuntuone/navigation-leak
Reviewer Review Type Date Requested Status
John O'Brien (community) Approve
Roberto Alsina (community) Approve
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.
Revision history for this message
Roberto Alsina (ralsina) wrote :

+1

review: Approve
Revision history for this message
John O'Brien (jdobrien) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'libubuntuone/u1-music-store.c'
--- libubuntuone/u1-music-store.c 2011-03-10 19:08:31 +0000
+++ libubuntuone/u1-music-store.c 2011-03-11 14:29:41 +0000
@@ -503,6 +503,7 @@
503 U1MusicStore *music_store = U1_MUSIC_STORE (user_data);503 U1MusicStore *music_store = U1_MUSIC_STORE (user_data);
504 SoupURI *parsed_uri;504 SoupURI *parsed_uri;
505 gchar *internal_uri;505 gchar *internal_uri;
506 gboolean return_val = FALSE;
506507
507 /* Remove watching callback for the page */508 /* Remove watching callback for the page */
508 if (music_store->priv->watch_id != 0) {509 if (music_store->priv->watch_id != 0) {
@@ -542,7 +543,7 @@
542 g_debug ("overriding the library page to ours");543 g_debug ("overriding the library page to ours");
543 load_delayed_page (web_view, library_override, policy_decision);544 load_delayed_page (web_view, library_override, policy_decision);
544545
545 return TRUE;546 return_val = TRUE;
546 }547 }
547 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "www.7digital.com")) {548 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "www.7digital.com")) {
548 /* host is 7digital.com. It must be in our store. */549 /* host is 7digital.com. It must be in our store. */
@@ -561,7 +562,7 @@
561 g_free (internal_uri);562 g_free (internal_uri);
562 g_free (to_and_from_error_uris);563 g_free (to_and_from_error_uris);
563564
564 return TRUE;565 return_val = TRUE;
565 }566 }
566 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "one.ubuntu.com")) {567 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "one.ubuntu.com")) {
567 /* host is one.ubuntu.com. It must not be the login page */568 /* host is one.ubuntu.com. It must not be the login page */
@@ -588,7 +589,7 @@
588 g_free (internal_uri);589 g_free (internal_uri);
589 g_free (to_and_from_error_uris);590 g_free (to_and_from_error_uris);
590591
591 return TRUE;592 return_val = TRUE;
592 }593 }
593 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "login.ubuntu.com")) {594 } else if (!g_strcmp0 ((const gchar *) parsed_uri->host, "login.ubuntu.com")) {
594 gchar *real_url;595 gchar *real_url;
@@ -613,13 +614,13 @@
613 g_free (internal_uri);614 g_free (internal_uri);
614 g_free (to_and_from_error_uris);615 g_free (to_and_from_error_uris);
615616
616 return TRUE;617 return_val = TRUE;
617 }618 }
618619
619 /* Free memory */620 /* Free memory */
620 soup_uri_free (parsed_uri);621 soup_uri_free (parsed_uri);
621622
622 return FALSE;623 return return_val;
623}624}
624625
625static void626static void

Subscribers

People subscribed via source and target branches