Project

General

Profile

Bug #941 » 0015-Fix-leak-in-cityrep.c-cityrep_sort_func.patch

S3_1 - Marko Lindqvist, 10/08/2024 09:18 PM

View differences:

client/gui-gtk-3.0/cityrep.c
GtkTreeIter *b, gpointer data)
{
gint col = GPOINTER_TO_INT(data);
const gchar *str1, *str2;
gchar *str1, *str2;
int i;
gtk_tree_model_get(model, a, col, &str1, -1);
gtk_tree_model_get(model, b, col, &str2, -1);
return cityrepfield_compare(str1, str2);
i = cityrepfield_compare(str1, str2);
g_free(str1);
g_free(str2);
return i;
}
/************************************************************************//**
client/gui-gtk-3.22/cityrep.c
GtkTreeIter *b, gpointer data)
{
gint col = GPOINTER_TO_INT(data);
const gchar *str1, *str2;
gchar *str1, *str2;
int i;
gtk_tree_model_get(model, a, col, &str1, -1);
gtk_tree_model_get(model, b, col, &str2, -1);
return cityrepfield_compare(str1, str2);
i = cityrepfield_compare(str1, str2);
g_free(str1);
g_free(str2);
return i;
}
/************************************************************************//**
client/gui-gtk-4.0/cityrep.c
GtkTreeIter *b, gpointer data)
{
gint col = GPOINTER_TO_INT(data);
const gchar *str1, *str2;
gchar *str1, *str2;
int i;
gtk_tree_model_get(model, a, col, &str1, -1);
gtk_tree_model_get(model, b, col, &str2, -1);
return cityrepfield_compare(str1, str2);
i = cityrepfield_compare(str1, str2);
g_free(str1);
g_free(str2);
return i;
}
/************************************************************************//**
(3-3/4)