diff --git a/libnemo-private/nemo-action.c b/libnemo-private/nemo-action.c index 671cfc215..7113ebad1 100644 --- a/libnemo-private/nemo-action.c +++ b/libnemo-private/nemo-action.c @@ -1431,11 +1431,7 @@ get_insertion_string (NemoAction *action, break; } - gchar *ret = str->str; - - g_string_free (str, FALSE); - - return ret; + return g_string_free (str, FALSE); } static GString * @@ -1591,9 +1587,7 @@ get_final_label (NemoAction *action, DEBUG ("Action Label: %s", str->str); - gchar *ret = str->str; - g_string_free (str, FALSE); - return ret; + return g_string_free (str, FALSE); } static gchar * @@ -1616,9 +1610,7 @@ get_final_tt (NemoAction *action, DEBUG ("Action Tooltip: %s", str->str); - gchar *ret = str->str; - g_string_free (str, FALSE); - return ret; + return g_string_free (str, FALSE); } static void diff --git a/libnemo-private/nemo-search-engine-advanced.c b/libnemo-private/nemo-search-engine-advanced.c index 8f16c5aa1..c05d98bfb 100644 --- a/libnemo-private/nemo-search-engine-advanced.c +++ b/libnemo-private/nemo-search-engine-advanced.c @@ -770,9 +770,9 @@ load_contents (SearchThreadData *data, break; } - if (chunk != NULL) { + //if (chunk != NULL) { g_string_append_len (str, chunk, len); - } + //} } while (!g_cancellable_is_cancelled (data->cancellable)); g_input_stream_close (stream, diff --git a/search-helpers/nemo-mso-to-txt.c b/search-helpers/nemo-mso-to-txt.c index fcbdb4a75..e1cbc4bd3 100644 --- a/search-helpers/nemo-mso-to-txt.c +++ b/search-helpers/nemo-mso-to-txt.c @@ -61,7 +61,7 @@ process_file (GString *collective, gsf_input_read (GSF_INPUT (file), size, chunk); - if (chunk != NULL) + // if (chunk != NULL) always true { remaining -= size; contents = g_string_append_len (contents, (const gchar *) chunk, size); diff --git a/src/nemo-places-sidebar.c b/src/nemo-places-sidebar.c index 323130b43..8374d0719 100644 --- a/src/nemo-places-sidebar.c +++ b/src/nemo-places-sidebar.c @@ -4399,6 +4399,9 @@ nemo_places_sidebar_dispose (GObject *object) g_free (sidebar->uri); sidebar->uri = NULL; + g_clear_object (&sidebar->ui_manager); + sidebar->ui_manager = NULL; + free_drag_data (sidebar); g_clear_handle_id (&sidebar->actions_changed_idle_id, g_source_remove); @@ -4437,11 +4440,15 @@ nemo_places_sidebar_dispose (GObject *object) breakpoint_changed_cb, sidebar); + g_signal_handlers_disconnect_by_func (nemo_preferences, + reset_menu, + sidebar); + g_signal_handlers_disconnect_by_func (nemo_preferences, desktop_setting_changed_callback, sidebar); - g_signal_handlers_disconnect_by_func (gnome_background_preferences, + g_signal_handlers_disconnect_by_func (nemo_desktop_preferences, desktop_setting_changed_callback, sidebar); diff --git a/src/nemo-properties-window.c b/src/nemo-properties-window.c index 7ec1e12e4..1c5339695 100644 --- a/src/nemo-properties-window.c +++ b/src/nemo-properties-window.c @@ -4719,7 +4719,6 @@ get_pending_key (GList *file_list) GList *l; GList *uris; GString *key; - char *ret; uris = NULL; for (l = file_list; l != NULL; l = l->next) { @@ -4735,10 +4734,7 @@ get_pending_key (GList *file_list) g_list_free_full (uris, g_free); - ret = key->str; - g_string_free (key, FALSE); - - return ret; + return g_string_free (key, FALSE); } static StartupData *