On Wed, 21 Jan 2026 11:22:53 +0900 Masami Hiramatsu (Google) <[email protected]> wrote:
> > > > Fix this by freeing *vals and setting it to NULL when realloc() fails. > > This makes the error handling self-contained in add_string() so callers > > don't need to handle cleanup on failure. > > This looks not enough. If the memory allocation is failed, it should NOT > continue anything. > > I think we need to make the command itself failure when it fails to > allocate memory, as below: That's a separate bug. I'm taking this current patch as-is as a fix for the leak. Not stopping immediately is a separate issue. -- Steve
