Bug #941 » 0027-Fix-leak-in-cityrep.c-cityrep_sort_func.patch
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;
|
||
}
|
||
/************************************************************************//**
|