Commit cbcc607
team: Fix double free in error path
The __send_and_alloc_skb() receives a skb ptr as a parameter but in
case it fails the skb is not valid:
- Send failed and released the skb internally.
- Allocation failed.
The current code tries to release the skb in case of failure which
causes redundant freeing.
Fixes: 9b00cf2 ("team: implement multipart netlink messages for options transfers")
Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>1 parent cfda06d commit cbcc607
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2395 | 2395 | | |
2396 | 2396 | | |
2397 | 2397 | | |
2398 | | - | |
| 2398 | + | |
2399 | 2399 | | |
2400 | 2400 | | |
2401 | 2401 | | |
| |||
2681 | 2681 | | |
2682 | 2682 | | |
2683 | 2683 | | |
2684 | | - | |
| 2684 | + | |
2685 | 2685 | | |
2686 | 2686 | | |
2687 | 2687 | | |
| |||
0 commit comments