juniskane commented on pull request #425: URL: https://github.com/apache/incubator-nuttx-apps/pull/425#issuecomment-709038345
> There might be difficulties with setbuf() and setvbuf(), however, if application sets a buffer in stack and relied on fclose() disassociating it from the stream before exiting code block were buffer was defined. This is probably very rare scenario. Actually that case is likely fine, as any operation on stream after fclose() is UB anyway so it does not matter if the IO buffer vanishes silently. Nothing in nuttx libc touches the buffer without user calling a function first. Same applies to re-use of the buffer for some new stream by libc user. But automatically allocated buffer might leak memory (until task exit) if fclose on stdin/stdout/stderr does not free it. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
