diff options
author | Wang Hai <wanghai38@huawei.com> | 2020-06-09 22:18:16 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-06-09 13:26:23 -0700 |
commit | c96b6acc8f89a4a7f6258dfe1d077654c11415be (patch) | |
tree | 117d45f01a2bbbebf6b8fd2158686d9133a2afa6 /drivers/net/ethernet/marvell/mvneta.c | |
parent | 976ee3b21119dcf5c6d96233d688a1453f29fa83 (diff) | |
download | linux-stable-c96b6acc8f89a4a7f6258dfe1d077654c11415be.tar.gz linux-stable-c96b6acc8f89a4a7f6258dfe1d077654c11415be.tar.bz2 linux-stable-c96b6acc8f89a4a7f6258dfe1d077654c11415be.zip |
dccp: Fix possible memleak in dccp_init and dccp_fini
There are some memory leaks in dccp_init() and dccp_fini().
In dccp_fini() and the error handling path in dccp_init(), free lhash2
is missing. Add inet_hashinfo2_free_mod() to do it.
If inet_hashinfo2_init_mod() failed in dccp_init(),
percpu_counter_destroy() should be called to destroy dccp_orphan_count.
It need to goto out_free_percpu when inet_hashinfo2_init_mod() failed.
Fixes: c92c81df93df ("net: dccp: fix kernel crash on module load")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/marvell/mvneta.c')
0 files changed, 0 insertions, 0 deletions