提交 72150e9b 编写于 作者: D Dan Carpenter 提交者: David S. Miller

sock.c: potential null dereference

We test that "prot->rsk_prot" is non-null right before we dereference it
on this line.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ea3fb371
......@@ -2288,7 +2288,8 @@ int proto_register(struct proto *prot, int alloc_slab)
prot->rsk_prot->slab = NULL;
}
out_free_request_sock_slab_name:
kfree(prot->rsk_prot->slab_name);
if (prot->rsk_prot)
kfree(prot->rsk_prot->slab_name);
out_free_sock_slab:
kmem_cache_destroy(prot->slab);
prot->slab = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册