rhashtable: fix a memory leak in alloc_bucket_locks()
If vmalloc() was successful, do not attempt a kmalloc_array() Fixes: 4cf0b354 ("rhashtable: avoid large lock-array allocations") Reported-by: NCAI Qian <caiqian@redhat.com> Signed-off-by: NEric Dumazet <edumazet@google.com> Cc: Florian Westphal <fw@strlen.de> Acked-by: NHerbert Xu <herbert@gondor.apana.org.au> Tested-by: NCAI Qian <caiqian@redhat.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Showing
想要评论请 注册 或 登录