Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15288

Re: memleak in execute_function?

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: memleak in execute_function?
Date 2019-07-31 21:35 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.402.1564623346.1985.bug-bash@gnu.org> (permalink)
References <1564586812344-0.post@n7.nabble.com> <a691cf27-9017-5a0d-915b-c15b2765f591@case.edu> <1564621048237-0.post@n7.nabble.com> <28da8651-f34e-553b-433a-664c64884ee0@case.edu>

Show all headers | View raw


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    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: memleak in execute_function? Chet Ramey <chet.ramey@case.edu> - 2019-07-31 21:35 -0400

csiph-web