1
1
mirror of https://github.com/tstellar/bygfoot.git synced 2025-03-06 20:17:56 +01:00

Solving valgrind issues

This commit is contained in:
gunnar_g 2009-03-10 15:58:48 +00:00
parent 1382ca0f0c
commit fa58c3dc5f
4 changed files with 4 additions and 4 deletions

View File

@ -347,7 +347,6 @@ main (gint argc, gchar *argv[])
int fd2 = open ("stderr.log", O_CREAT|O_WRONLY|O_TRUNC, 0666); int fd2 = open ("stderr.log", O_CREAT|O_WRONLY|O_TRUNC, 0666);
dup2 (fd2, 2); dup2 (fd2, 2);
#endif #endif
gtk_set_locale ();
gtk_init (&argc, &argv); gtk_init (&argc, &argv);
main_init(&argc, &argv); main_init(&argc, &argv);

View File

@ -544,7 +544,7 @@ misc_string_choose_random(gchar *string)
return; return;
count = math_rndi(0, count - 1) + 1; count = math_rndi(0, count - 1) + 1;
start = string; start = g_strdup(string);
for (i = 0; string[i]; i++) for (i = 0; string[i]; i++)
if (string[i] == STR_SEP) if (string[i] == STR_SEP)
{ {

View File

@ -2741,6 +2741,7 @@ treeview_create_country_list(const GPtrArray *country_list)
} }
} }
g_strfreev(dir_split_up); g_strfreev(dir_split_up);
g_free(current_country);
} }
return GTK_TREE_MODEL(ls); return GTK_TREE_MODEL(ls);

View File

@ -258,8 +258,8 @@ xml_league_read_start_element (GMarkupParseContext *context,
else if(strcmp(element_name, TAG_TEAM) == 0) else if(strcmp(element_name, TAG_TEAM) == 0)
{ {
new_team = team_new(TRUE); new_team = team_new(TRUE);
misc_string_assign(&new_team.symbol, new_league.symbol); misc_string_assign(&(new_team.symbol), new_league.symbol);
misc_string_assign(&new_team.names_file, new_league.names_file); misc_string_assign(&(new_team.names_file), new_league.names_file);
new_team.clid = new_league.id; new_team.clid = new_league.id;
g_array_append_val(new_league.teams, new_team); g_array_append_val(new_league.teams, new_team);
state = STATE_TEAM; state = STATE_TEAM;