Thread (2 messages) 2 messages, 2 authors, 9d ago

Re: [PATCH iproute2] lib: fix memory leak in getcmdline()

flat view

From: patchwork-bot+netdevbpf@kernel.org
Date: 2026-10-02 16:00:07

Hello:

This patch was applied to iproute2/iproute2.git (main)
by Stephen Hemminger [off-list ref]:

On Thu,  1 Oct 2026 04:31:29 +0200 you wrote:
getline() may allocate line1 even when it returns -1, and the caller
must free the buffer on the error path.

When batch input ends with a missing continuation line, getcmdline()
returns without freeing line1. This can be reproduced with:

printf 'link show \\\n' | ./ip/ip -batch -

[...]
Here is the summary with links:
  - [iproute2] lib: fix memory leak in getcmdline()
    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=fde561a2a135

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help