Red Hat Bugzilla – Bug 63585
A sourced bash shell script fails with a free error
Last modified: 2007-04-18 12:42:01 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
Description of problem:
A simple script example is given below. The shell script is sourced and fails
after the third variable assignment.
$ cat bug_source.sh
$ . ./bug_source.sh
free: called with already freed block argument
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. source example shell script file.
Actual Results: free: called with already freed block argument
The above error is produced and because the shell script is sourced the shell
exits on error.
Expected Results: You should be able to set variables as many times as you
This looks like bash doesn't handle bad termcap definitions well enough - if
you move them around, you'll notice it crashes on setting TERM to
Replacing the script with an equal number of TERM settings using valid
terminals works, e.g.:
This seems to be fixed in Red Hat Linux 8.0.