free() behaviour questions
Posted on 2004-10-17
OK, I have a unix shell. I am using gcc compiler for cygwin and on a unix box @ uni.
I am wondering why, if I have the shell's control loop only exiting when 'exit' is typed in to the command line, a bunch of free()s that shouldn't have even been reached cause segmentation faults before the shell script has exited. The free()s relate to the input string and this is the problem, I beleive. The free()s are before a return of the regular int on exiting the main function.
Whatchya reckon?? Guidance appreciated.