summaryrefslogtreecommitdiff
path: root/shell.c
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2018-09-17 15:10:56 -0400
committerChet Ramey <chet.ramey@case.edu>2018-09-17 15:10:56 -0400
commit2f5dfe5a18b4670eb4cea32c1c76295eb70a8865 (patch)
treebf19e42dcaf6c5cf8e0ce0a1c15d56e8f8a6d675 /shell.c
parent9a51695bed07d37086c352372ac69d0a30039a6b (diff)
downloadbash-5.0-beta.tar.gz
bash-5.0-beta releasebash-5.0-beta
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