Skip to content
Snippets Groups Projects
Commit 988b173b authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #6623: fixed leak in history

parent 2ba41e9f
No related branches found
No related tags found
No related merge requests found
......@@ -100,15 +100,17 @@ static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpoi
history_entry = (gpointer) g_value_get_pointer (&obj);
}
gboolean result = TRUE;
if (text != NULL) {
if (history_entry) {
// Filter according to the type of call
// MISSED, INCOMING, OUTGOING, ALL
if ( (int) get_current_history_search_type () == SEARCH_ALL)
return g_regex_match_simple (search, text, G_REGEX_CASELESS, 0);
result = g_regex_match_simple (search, text, G_REGEX_CASELESS, 0);
else {
// We need a match on the history_state_t and the current search type
return (history_entry->_history_state + 1) == (guint) get_current_history_search_type () &&
result = (history_entry->_history_state + 1) == (guint) get_current_history_search_type () &&
g_regex_match_simple (search, text, G_REGEX_CASELESS, 0);
}
}
......@@ -118,5 +120,5 @@ static gboolean history_is_visible (GtkTreeModel* model, GtkTreeIter* iter, gpoi
g_value_unset (&val);
g_value_unset (&obj);
return TRUE;
return result;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment