From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Currently the assignment of pointer net from the sock_net(sk) call
is potentially dereferencing a null pointer sk. sk points to the
same location as pointer msk and msk is being null checked after
the sock_net call. Fix this by calling sock_net after the null
check on pointer msk.
Addresses-Coverity: ("Dereference before null check")
Fixes: 00cfd77b9063 ("mptcp: retransmit ADD_ADDR when timeout")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
---
net/mptcp/pm_netlink.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)