diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-07-21 20:39:29 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-07-21 20:39:29 -0400 |
commit | 38a5db8f83aa9eaf7340c049f91bcf6ed670382b (patch) | |
tree | 6633cb8e9bf93c2ea8486c84dbdad4724f64b057 /gtk/gtksearchenginetracker.c | |
parent | 94187127821a31b3367ce7b60d4bd5f8e874f6cd (diff) | |
download | gtk+-38a5db8f83aa9eaf7340c049f91bcf6ed670382b.tar.gz |
GtkQuery: Make API follow GTK+ conversions
We generally have const getters for strings, and the two users
of this API were promptly leaking the (unexpected) copy they
got from gtk_query_get_location and gtk_query_get_text.
Diffstat (limited to 'gtk/gtksearchenginetracker.c')
-rw-r--r-- | gtk/gtksearchenginetracker.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gtk/gtksearchenginetracker.c b/gtk/gtksearchenginetracker.c index 6c90324513..29edb7f207 100644 --- a/gtk/gtksearchenginetracker.c +++ b/gtk/gtksearchenginetracker.c @@ -320,8 +320,8 @@ static void gtk_search_engine_tracker_start (GtkSearchEngine *engine) { GtkSearchEngineTracker *tracker; - gchar *search_text; - gchar *location_uri; + const gchar *search_text; + const gchar *location_uri; GString *sparql; gboolean recursive; @@ -386,7 +386,6 @@ gtk_search_engine_tracker_start (GtkSearchEngine *engine) get_query_results (tracker, sparql->str, query_callback, g_object_ref (tracker)); g_string_free (sparql, TRUE); - g_free (search_text); } static void |