Xin Long 97bf6f81b2 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 <pabeni@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Tung Nguyen <tung.q.nguyen@dektech.com.au>
Link: https://lore.kernel.org/r/90710748c29a1521efac4f75ea01b3b7e61414cf.1714485818.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2024-05-01 18:39:44 -07:00
..
2024-04-23 11:35:52 +02:00
2024-03-11 18:06:04 -07:00
2024-02-20 15:32:45 +01:00
2024-03-21 14:41:00 -07:00
2024-01-11 10:07:29 -08:00
2024-04-26 13:48:24 +02:00
2024-03-07 21:12:43 -08:00
2024-04-22 12:20:09 -07:00
2023-12-12 14:24:14 +01:00
2024-01-31 16:41:16 -08:00