datapath-windows: Release WFP allocated objects
authorSorin Vinturis <svinturis@cloudbasesolutions.com>
Mon, 22 Dec 2014 15:06:34 +0000 (15:06 +0000)
committerBen Pfaff <blp@nicira.com>
Thu, 1 Jan 2015 17:11:12 +0000 (09:11 -0800)
commit57966ba360fcdc04ba3410c6e296300a2e8a6f64
tree4b0a0e66f4a5ebcc51ba8459ff88a59f4e2fc69c
parenteda457f1a0d17bfa9a4c46e179f12a83b5a86edf
datapath-windows: Release WFP allocated objects

Filter and sublayer WFP objects are created when the filter attach routine
is called and the tunnel filter is initialized, and they are released
in the uninitialize part. But the release part is done indirectly, through
the FwpmEngineClose function call which releases the latter objects when
the tunnel is uninitialized at filter detach.

We need to properly release the created objects and not rely that
FwpmEngineClose function does this for us, because if we decide to keep
the engine opened passed the filter detach those objects will continue to
exist.

Even though the FwpmEngineClose function releases the latter objects, we
still need this and the reason will became obvious in the next patch.

Signed-off-by: Sorin Vinturis <svinturis@cloudbasesolutions.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
datapath-windows/ovsext/TunnelFilter.c