diff options
author | Xin Long <[email protected]> | 2024-04-30 10:03:38 -0400 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-05-01 18:39:44 -0700 |
commit | 97bf6f81b29a8efaf5d0983251a7450e5794370d (patch) | |
tree | f83f56213adc7886558f9dba0409f4990a9698aa /net/tipc/node.c | |
parent | 080cbb890286cd794f1ee788bbc5463e2deb7c2b (diff) |
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]>
Diffstat (limited to 'net/tipc/node.c')
0 files changed, 0 insertions, 0 deletions