meta-flow: Correctly set destination MAC in mf_set_flow_value().
[sliver-openvswitch.git] / datapath / vport.c
index 9881fb8..e9ccdbd 100644 (file)
@@ -196,8 +196,10 @@ struct vport *ovs_vport_alloc(int priv_size, const struct vport_ops *ops,
        kobject_init(&vport->kobj, &brport_ktype);
 
        vport->percpu_stats = alloc_percpu(struct vport_percpu_stats);
-       if (!vport->percpu_stats)
+       if (!vport->percpu_stats) {
+               kfree(vport);
                return ERR_PTR(-ENOMEM);
+       }
 
        spin_lock_init(&vport->stats_lock);