I'm not totally sure about that, but I suppose it shouldn't leak.
Here's what Microsoft's Best Practice says:
> Use dynamic sessions.
>
> Many applications add filtering policy objects at start, and then delete 
> these objects at stop. By using a dynamic session, you guarantee that these 
> objects
> are deleted even if the application crashes. Furthermore, simply closing the 
> engine handle at stop is more efficient than making individual calls to delete
> each object.
>
https://msdn.microsoft.com/en-us/library/windows/desktop/bb442411%28v=vs.85%29.aspx

> If /session/.*flags* is set to *FWPM_SESSION_FLAG_DYNAMIC*, any WFP objects 
> added during the session are automatically deleted when the session ends. If 
> the
> session is not dynamic, the caller needs to explicitly delete all WFP objects 
> added during the session.
https://technet.microsoft.com/ru-ru/aa364040


On 12/10/2015 08:17 PM, Selva Nair wrote:
>
> On Thu, Dec 10, 2015 at 11:49 AM, ValdikSS <i...@valdikss.org.ru 
> <mailto:i...@valdikss.org.ru>> wrote:
>
> Provided it doesn't leak memory. As the current implementation of 
> wfp_add_filter does return the id of the added filter (in &filterid) , its 
> easy to save them
> into some globals and delete all the filters in wfp_uninit.
>
> However, If you are sure there is no leak, just closing the engine is fine.
>
> Other than this v8 is good to go.
>
> Selva
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Openvpn-devel mailing list
> Openvpn-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to