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


Groups > gnu.bash.bug > #15288 > unrolled thread

Re: memleak in execute_function?

Started byChet Ramey <chet.ramey@case.edu>
First post2019-07-31 21:35 -0400
Last post2019-07-31 21:35 -0400
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

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

#15288 — Re: memleak in execute_function?

FromChet Ramey <chet.ramey@case.edu>
Date2019-07-31 21:35 -0400
SubjectRe: memleak in execute_function?
Message-ID<mailman.402.1564623346.1985.bug-bash@gnu.org>
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/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web