[rhythmbox] fix up ref counting and stuff in rb_podcast_manager_subscribe_feed



commit dbef1242c6ad3838a136770ffc8e17641593cc2a
Author: Jonathan Matthew <jonathan d14n org>
Date:   Sat Feb 27 22:02:21 2021 +1000

    fix up ref counting and stuff in rb_podcast_manager_subscribe_feed

 podcast/rb-podcast-manager.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
---
diff --git a/podcast/rb-podcast-manager.c b/podcast/rb-podcast-manager.c
index 59c95a111..41734f87f 100644
--- a/podcast/rb-podcast-manager.c
+++ b/podcast/rb-podcast-manager.c
@@ -836,6 +836,7 @@ rb_podcast_manager_subscribe_feed (RBPodcastManager *pd, const char *url, gboole
                                         _("The URL \"%s\" has already been added as a radio station. "
                                         "If this is a podcast feed, please remove the radio station."), url);
                        g_object_unref (feed);
+                       g_free (feed_url);
                        podcast_update_free (update);
                        return FALSE;
                }
@@ -851,7 +852,7 @@ rb_podcast_manager_subscribe_feed (RBPodcastManager *pd, const char *url, gboole
                rb_debug ("not checking mime type for %s", feed_url);
                start_feed_parse (pd, update);
        } else {
-               g_file_query_info_async (feed,
+               g_file_query_info_async (g_object_ref (feed),
                                         G_FILE_ATTRIBUTE_STANDARD_CONTENT_TYPE,
                                         0,
                                         G_PRIORITY_DEFAULT,
@@ -861,6 +862,7 @@ rb_podcast_manager_subscribe_feed (RBPodcastManager *pd, const char *url, gboole
        }
 
        g_object_unref (feed);
+       g_free (feed_url);
        return TRUE;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]