bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: memleak in execute_function?


From: Chet Ramey
Subject: Re: memleak in execute_function?
Date: Wed, 31 Jul 2019 21:35:37 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 7/31/19 8:57 PM, fireshen wrote:
> Yeah, I agree with your opinion, in the branch "if (subshell == 0) ", we have
> the function "maybe_restore_getopt_state" to free gs; however, in the branch
> "else", it seems like forget to free "gs", or we don't have to free it?

We don't have to free it. If subshell != 0 we are called from a function
that executes a function in a subshell environment, and all it does is
call exit().


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    address@hidden    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]