diff options
author | Daniel Jacobowitz <drow@false.org> | 2002-07-10 17:18:16 +0000 |
---|---|---|
committer | Daniel Jacobowitz <drow@false.org> | 2002-07-10 17:18:16 +0000 |
commit | 02f0d45d87027ca7eb6da98958e3f7846b3305b0 (patch) | |
tree | 2ff1acc34791c410d0642f433ade531d8eae41bc /gdb/valops.c | |
parent | 4a2b4636a2a1c83f25c238bc0617f6aee1e870d4 (diff) | |
download | gdb-02f0d45d87027ca7eb6da98958e3f7846b3305b0.zip gdb-02f0d45d87027ca7eb6da98958e3f7846b3305b0.tar.gz gdb-02f0d45d87027ca7eb6da98958e3f7846b3305b0.tar.bz2 |
2002-07-10 Daniel Jacobowitz <drow@mvista.com>
* valops.c (find_overload_match): Free oload_syms.
Diffstat (limited to 'gdb/valops.c')
-rw-r--r-- | gdb/valops.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/valops.c b/gdb/valops.c index df42e09..e4c1db4 100644 --- a/gdb/valops.c +++ b/gdb/valops.c @@ -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); } |