Florian Fainelli
4971667924
net: dsa: skb_put_padto() already frees nskb
...
The first call of skb_put_padto() will free up the SKB on error, but we
return NULL which tells dsa_slave_xmit() that the original SKB should be
freed so this would lead to a double free here.
The second skb_put_padto() already frees the passed sk_buff reference
upon error, so calling kfree_skb() on it again is not necessary.
Detected by CoverityScan, CID#1416687 ("USE_AFTER_FREE")
Fixes: e71cb9e009 ("net: dsa: ksz: fix skb freeing")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com >
Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com >
Signed-off-by: David S. Miller <davem@davemloft.net >
2017-08-23 20:33:49 -07:00
..
2017-04-12 22:02:40 +02:00
2017-07-15 12:00:42 -07:00
2017-06-20 13:30:14 -04:00
2017-06-26 23:13:22 -04:00
2017-06-16 11:48:40 -04:00
2017-07-04 22:35:16 +01:00
2017-07-04 22:35:19 +01:00
2017-07-31 11:17:38 +02:00
2017-07-05 12:31:59 -07:00
2017-05-02 11:46:28 -04:00
2017-07-14 08:19:23 -07:00
2017-07-01 07:39:08 -07:00
2017-06-16 11:48:37 -04:00
2017-08-01 16:46:45 +02:00
2017-08-23 20:33:49 -07:00
2017-05-21 13:42:33 -04:00
2017-08-16 14:26:26 -07:00
2017-07-04 22:35:15 +01:00
2017-03-03 10:16:38 -08:00
2017-08-23 20:33:49 -07:00
2017-06-16 11:48:40 -04:00
2017-08-22 13:40:23 -07:00
2017-06-26 23:13:22 -04:00
2017-08-22 10:27:26 -07:00
2017-08-22 11:03:19 -07:00
2017-07-04 22:35:17 +01:00
2017-08-18 16:21:51 -07:00
2017-07-03 02:31:22 -07:00
2017-07-01 07:39:08 -07:00
2017-08-14 22:18:12 -07:00
2017-07-04 22:35:15 +01:00
2017-07-04 22:35:16 +01:00
2017-07-04 22:35:15 +01:00
2017-08-09 09:49:42 +03:00
2017-06-07 15:53:24 -04:00
2017-07-08 11:26:41 +01:00
2017-06-16 11:48:40 -04:00
2017-07-20 16:33:39 -07:00
2017-04-13 13:58:22 -04:00
2017-07-01 07:39:08 -07:00
2017-07-04 22:35:17 +01:00
2017-06-23 00:38:31 +02:00
2017-08-16 14:12:37 -07:00
2017-08-10 09:52:12 -07:00
2017-07-01 07:39:08 -07:00
2017-06-16 11:48:39 -04:00
2017-06-16 11:48:39 -04:00
2017-08-08 21:03:47 -07:00
2017-06-13 11:07:51 +02:00
2017-03-09 18:23:27 -08:00
2017-08-18 16:23:23 -07:00
2017-08-22 14:39:58 -07:00
2017-08-18 16:00:47 -07:00
2017-05-16 14:49:43 -04:00
2017-03-03 20:43:26 -08:00
2017-07-21 16:26:01 -07:00
2017-06-08 14:16:24 -04:00
2017-08-22 14:25:02 -07:00
2017-07-06 10:58:19 +01:00
2017-08-18 15:12:54 -07:00
2017-06-20 13:30:15 -04:00
2017-07-07 11:35:55 +01:00
2017-07-04 22:35:18 +01:00
2017-08-03 10:15:22 +02:00
2017-07-04 13:14:34 -04:00
2017-06-15 12:12:40 -04:00
2017-06-15 12:12:40 -04:00
2017-07-24 14:17:01 -07:00
2017-04-16 23:42:49 -05:00