memleak in execute_function?

2019-07-31 Thread fireshen
Hey all, I suspect there is a memleak in bash. I use the bash 4.4.23 (fedora Linux) with ASAN. Then I run some testcases and find a memleak. I think we need to free this "gs" in execute_cmd.c *gs* = sh_getopt_save_istate (); if (subshe

Re: memleak in execute_function?

2019-07-31 Thread fireshen
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? -- Sent from: http://gnu-bash.2382.n7.nabble.com/