From 5959df8e16259bc59fd10c8c187e1baa130c8aeb Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 25 Jul 1997 22:47:17 +0000 Subject: * top.c (execute_command): Force cleanup of alloca areas. * findvar.c (registers_changed): Likewise. Fixes memory "leak" reported by HP. Call from execute_command is for general alloca cleanup; call from registers_changed is to fix hp's specific problem. --- gdb/top.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gdb/top.c') diff --git a/gdb/top.c b/gdb/top.c index 92e9e99..dfa8f3d 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -1209,6 +1209,10 @@ execute_command (p, from_tty) free_all_values (); + /* Force cleanup of any alloca areas if using C alloca instead of + a builtin alloca. */ + alloca (0); + /* This can happen when command_line_input hits end of file. */ if (p == NULL) return; -- cgit v1.1