diff mbox series

[ovs-dev] netdev-linux.c : nl_sock_listen_all_nsid triggers NULL deref.

Message ID ME3PR01MB57813973FFCDED3F4C4927FFCD2B9@ME3PR01MB5781.ausprd01.prod.outlook.com
State New
Headers show
Series [ovs-dev] netdev-linux.c : nl_sock_listen_all_nsid triggers NULL deref. | expand

Commit Message

miterv@outlook.com May 19, 2021, 3:57 p.m. UTC
netdev-linux.c : nl_sock_listen_all_nsid triggers NULL deref.

Signed-off-by: miter <linhuang@ruijie.com.cn>
---
 lib/netdev-linux.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--
2.31.1
diff mbox series

Patch

diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c
index 15b25084b..0994044ec 100644
--- a/lib/netdev-linux.c
+++ b/lib/netdev-linux.c
@@ -634,7 +634,9 @@  netdev_linux_notify_sock(void)
                 }
             }
         }
-        nl_sock_listen_all_nsid(sock, true);
+        if (sock) {
+            nl_sock_listen_all_nsid(sock, true);
+ }
         ovsthread_once_done(&once);
     }