aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/core/rtnetlink.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 24431e578310..60c928894a78 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -324,6 +324,10 @@ void rtnl_unregister_all(int protocol)
324 324
325 rtnl_lock(); 325 rtnl_lock();
326 tab = rtnl_msg_handlers[protocol]; 326 tab = rtnl_msg_handlers[protocol];
327 if (!tab) {
328 rtnl_unlock();
329 return;
330 }
327 RCU_INIT_POINTER(rtnl_msg_handlers[protocol], NULL); 331 RCU_INIT_POINTER(rtnl_msg_handlers[protocol], NULL);
328 for (msgindex = 0; msgindex < RTM_NR_MSGTYPES; msgindex++) { 332 for (msgindex = 0; msgindex < RTM_NR_MSGTYPES; msgindex++) {
329 link = tab[msgindex]; 333 link = tab[msgindex];