datapath: Don't dereference potentially NULL vport in patch ports.
[openvswitch] / datapath / vport-patch.c
index 0056792bcbdcff3e01ba88a9f4b3cc4da0209453..ea46a8dcfc275f54c118a6ecdbd1b8a953cb5b9a 100644 (file)
@@ -233,7 +233,7 @@ error:
 
 static void update_peers(struct net *net, const char *name, struct vport *vport)
 {
-       struct hlist_head *bucket = hash_bucket(ovs_dp_get_net(vport->dp), name);
+       struct hlist_head *bucket = hash_bucket(net, name);
        struct patch_vport *peer_vport;
        struct hlist_node *node;