mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-18 10:24:30 +08:00
correct memory leaks in namelist code for derived types
From-SVN: r98352
This commit is contained in:
parent
8a731165af
commit
883dd42959
@ -1,3 +1,8 @@
|
||||
2005-04-18 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
* io/list_read.c (nml_touch_nodes, nml_read_obj,
|
||||
nml_get_obj_data): Fix memory leaks in code for derived types.
|
||||
|
||||
2005-04-11 Francois-Xavier Coudert <coudert@clipper.ens.fr>
|
||||
|
||||
PR libfortran/20950
|
||||
@ -16,11 +21,11 @@
|
||||
|
||||
2005-04-17 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
* io/list_read.c (eat_separator): at_eol = 1 replaced(zapped at some time?).
|
||||
* io/list_read.c (eat_separator): at_eol = 1 replaced
|
||||
(zapped at some time?).
|
||||
|
||||
2005-04-17 Paul Thomas <pault@gcc.gnu.org>
|
||||
|
||||
|
||||
PR libgfortran/12884
|
||||
PR libgfortran/17285
|
||||
PR libgfortran/18122
|
||||
|
@ -1673,6 +1673,7 @@ nml_touch_nodes (namelist_info * nl)
|
||||
else
|
||||
break;
|
||||
}
|
||||
free_mem (ext_name);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -1914,10 +1915,16 @@ nml_read_obj (namelist_info * nl, index_type offset)
|
||||
{
|
||||
|
||||
if (nml_read_obj (cmp, (index_type)(pdata - nl->mem_pos)) == FAILURE)
|
||||
return FAILURE;
|
||||
{
|
||||
free_mem (obj_name);
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
if (input_complete)
|
||||
return SUCCESS;
|
||||
{
|
||||
free_mem (obj_name);
|
||||
return SUCCESS;
|
||||
}
|
||||
}
|
||||
|
||||
free_mem (obj_name);
|
||||
@ -2105,6 +2112,7 @@ get_name:
|
||||
strcpy (ext_name, root_nl->var_name);
|
||||
strcat (ext_name, saved_string);
|
||||
nl = find_nml_node (ext_name);
|
||||
free_mem (ext_name);
|
||||
}
|
||||
else
|
||||
nl = find_nml_node (saved_string);
|
||||
|
Loading…
Reference in New Issue
Block a user