2002-07-10 Daniel Jacobowitz <drow@mvista.com>

* valops.c (find_overload_match): Free oload_syms.
This commit is contained in:
Daniel Jacobowitz 2002-07-10 17:18:16 +00:00
parent 4a2b4636a2
commit 02f0d45d87
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,7 @@
2002-07-10 Daniel Jacobowitz <drow@mvista.com>
* valops.c (find_overload_match): Free oload_syms.
2002-07-09 Joel Brobecker <brobecker@gnat.com>
Define HAVE_SYS_PROC_H if sys/proc.h exists

View File

@ -2707,6 +2707,7 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method,
register int jj;
register int ix;
int static_offset;
struct cleanup *cleanups = NULL;
char *obj_type_name = NULL;
char *func_name = NULL;
@ -2748,6 +2749,7 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method,
}
oload_syms = make_symbol_overload_list (fsym);
cleanups = make_cleanup (xfree, oload_syms);
while (oload_syms[++i])
num_fns++;
if (!num_fns)
@ -2904,6 +2906,9 @@ find_overload_match (struct type **arg_types, int nargs, char *name, int method,
}
*objp = temp;
}
if (cleanups != NULL)
do_cleanups (cleanups);
return oload_incompatible ? 100 : (oload_non_standard ? 10 : 0);
}