]> Git Repo - linux.git/commit
tipc: fix a possible memleak in tipc_buf_append
authorXin Long <[email protected]>
Tue, 30 Apr 2024 14:03:38 +0000 (10:03 -0400)
committerJakub Kicinski <[email protected]>
Thu, 2 May 2024 01:39:44 +0000 (18:39 -0700)
commit97bf6f81b29a8efaf5d0983251a7450e5794370d
treef83f56213adc7886558f9dba0409f4990a9698aa
parent080cbb890286cd794f1ee788bbc5463e2deb7c2b
tipc: fix a possible memleak in tipc_buf_append

__skb_linearize() doesn't free the skb when it fails, so move
'*buf = NULL' after __skb_linearize(), so that the skb can be
freed on the err path.

Fixes: b7df21cf1b79 ("tipc: skb_linearize the head skb when reassembling msgs")
Reported-by: Paolo Abeni <[email protected]>
Signed-off-by: Xin Long <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Reviewed-by: Tung Nguyen <[email protected]>
Link: https://lore.kernel.org/r/90710748c29a1521efac4f75ea01b3b7e61414cf.1714485818.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <[email protected]>
net/tipc/msg.c
This page took 0.049715 seconds and 4 git commands to generate.