]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: Fix possible memory leak
authorWei Yongjun <weiyongjun1@huawei.com>
Thu, 18 May 2017 15:34:41 +0000 (15:34 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 May 2017 19:18:31 +0000 (15:18 -0400)
commitd83ce3a00c2136349f308df5471bd124d8c6af7e
tree8d332f01f8326329c31418ee6ac56043c68d7601
parentc8f0f9e0515820d28737d6d1495fcc028c39438a
net/mlx5e: Fix possible memory leak

'encap_header' is malloced and should be freed before leaving from
the error handling cases, otherwise it will cause memory leak.

Fixes: ccf500f6d873 ("net/mlx5e: Add support to neighbour update flow")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_tc.c