summaryrefslogtreecommitdiff
path: root/builtins/exec.def
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1998-07-23 14:37:54 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:52 +0000
commitbc4cd23ce958feda898c618215f94d8a4e8f4ffa (patch)
tree32fc9a13b636cb4d29873feddc533d3dfb25a917 /builtins/exec.def
parentcce855bc5b117cb7ae70064131120687bc69fac0 (diff)
downloadbash-bc4cd23ce958feda898c618215f94d8a4e8f4ffa.tar.gz
Imported from ../bash-2.02.1.tar.gz.
Diffstat (limited to 'builtins/exec.def')
-rw-r--r--builtins/exec.def5
1 files changed, 5 insertions, 0 deletions
diff --git a/builtins/exec.def b/builtins/exec.def
index 4e1394de..d7166d78 100644
--- a/builtins/exec.def
+++ b/builtins/exec.def
@@ -191,6 +191,11 @@ exec_builtin (list)
#endif /* JOB_CONTROL */
shell_execve (command, args, env);
+
+ /* We have to set this to NULL because shell_execve has called realloc()
+ to stuff more items at the front of the array, which may have caused
+ the memory to be freed by realloc(). We don't want to free it twice. */
+ args = (char **)NULL;
if (cleanenv == 0)
adjust_shell_level (1);