summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell.c')
-rw-r--r--shell.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shell.c b/shell.c
index ad76636c..a9659bb8 100644
--- a/shell.c
+++ b/shell.c
@@ -363,7 +363,7 @@ main (argc, argv, env)
#endif /* !NO_MAIN_ENV_ARG */
{
register int i;
- int code, old_errexit_flag;
+ int code, old_errexit_flag, old_onecmd;
#if defined (RESTRICTED_SHELL)
int saverst;
#endif
@@ -1012,7 +1012,7 @@ sh_exit (s)
int s;
{
#if defined (MALLOC_DEBUG) && defined (USING_BASH_MALLOC)
- if (malloc_trace_at_exit)
+ if (malloc_trace_at_exit && (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB)) == 0)
trace_malloc_stats (get_name_for_error (), (char *)NULL);
/* mlocation_write_table (); */
#endif