net: xfrm: fix memory leak in xfrm_user_policy()
if xfrm_get_translator() failed, xfrm_user_policy() return without freeing 'data', which is allocated in memdup_sockptr(). Fixes: 96392ee5 ("xfrm/compat: Translate 32-bit user_policy from sockptr") Reported-by: NHulk Robot <hulkci@huawei.com> Signed-off-by: NYu Kuai <yukuai3@huawei.com> Signed-off-by: NSteffen Klassert <steffen.klassert@secunet.com>
Showing
想要评论请 注册 或 登录