Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Fix memory leak



On Fri, Jan 3, 2025 at 8:36 AM Dimitris Apostolou
<dimitris.apostolou@xxxxxxxxxx> wrote:
>
> zsh/Src/Zle/zle_main.c:352:2: error: Common realloc mistake: 'kungetbuf' nulled but not freed upon failure [memleakOnRealloc]

This is a false positive.  kungetbuf can never be NULL here, it's
initialized in the setup_() function.  There's also no way for a
caller to recover from an out-of-memory condition here, so there's no
reason to free the old buffer -- the program is going to crash.




Messages sorted by: Reverse Date, Date, Thread, Author