Skip to contentSkip to conversation

Set WFP engine handle to NULL in win_wfp_uninit()

PATCH In review Selva Nair 2 participants 2 messages Jun 4, 2016 – Jun 5, 2016

lore
Share & tools
lore

Selva Nair

author
#0 lore raw

PATCH 1/1 Set WFP engine handle to NULL in win_wfp_uninit()

This was missed by commit 6a33a34dee8f3

---
 src/openvpn/win32.c |    1 +
 1 file changed, 1 insertion(+)
src/openvpn/win32.c +1 -0
index f4d3237..8a2f957 100644
@@ -1192,6 +1192,7 @@ win_wfp_uninit(const HANDLE msg_channel)
     else
       {
         delete_block_dns_filters (m_hEngineHandle);
+        m_hEngineHandle = NULL;
       }
 
     return true;
Signature · 1 line
1.7.10.4
#1 lore raw

ACK, making engine state explicit is good style - and it protects against crashes if calling win_wfp_uninit() twice without opening it in between again.

Your patch has been applied to the master branch.

commit 895d75cf99bf8f3b95b01d6e19df30208cec27a9

Author: Selva Nair
Date:   Sat Jun 4 16:09:05 2016 -0400
     Set WFP engine handle to NULL in win_wfp_uninit()

     Signed-off-by: Selva Nair <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: http://article.gmane.org/gmane.network.openvpn.devel/11789
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering