datapath-windows: Solved BSOD when cleaning up the VXLAN tunnel
[cascardo/ovs.git] / datapath-windows / ovsext / Vxlan.c
index f43805a..b84c1d0 100644 (file)
@@ -154,11 +154,11 @@ OvsCleanupVxlanTunnel(PIRP irp,
                                       vxlanPort->filterID,
                                       callback,
                                       tunnelContext);
+    } else {
+        OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
+        vport->priv = NULL;
     }
 
-    OvsFreeMemoryWithTag(vport->priv, OVS_VXLAN_POOL_TAG);
-    vport->priv = NULL;
-
     return status;
 }