summaryrefslogtreecommitdiff
path: root/datapath-windows/ovsext/Flow.c
diff options
context:
space:
mode:
Diffstat (limited to 'datapath-windows/ovsext/Flow.c')
-rw-r--r--datapath-windows/ovsext/Flow.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/datapath-windows/ovsext/Flow.c b/datapath-windows/ovsext/Flow.c
index b93f475df..69b546a58 100644
--- a/datapath-windows/ovsext/Flow.c
+++ b/datapath-windows/ovsext/Flow.c
@@ -1513,6 +1513,11 @@ OvsDeleteFlowTable(OVS_DATAPATH *datapath)
DeleteAllFlows(datapath);
OvsFreeMemoryWithTag(datapath->flowTable, OVS_FLOW_POOL_TAG);
datapath->flowTable = NULL;
+
+ if (datapath->lock == NULL) {
+ return NDIS_STATUS_SUCCESS;
+ }
+
NdisFreeRWLock(datapath->lock);
return NDIS_STATUS_SUCCESS;
@@ -1544,6 +1549,10 @@ OvsAllocateFlowTable(OVS_DATAPATH *datapath,
}
datapath->lock = NdisAllocateRWLock(switchContext->NdisFilterHandle);
+ if (!datapath->lock) {
+ return NDIS_STATUS_RESOURCES;
+ }
+
return NDIS_STATUS_SUCCESS;
}