X-Git-Url: https://www.tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fmingw%2Fdevice.c;h=e1fbf2200cdfc4b0a1738ad6e3a704e51c87ab45;hp=dfda08951f01de73ab8b47828004042a47f19771;hb=2ed154e73192d5e162544bc570abbb3a1df3ec83;hpb=721e4caee0f7c6e003c297c95fb6d93bd4102219 diff --git a/src/mingw/device.c b/src/mingw/device.c index dfda0895..e1fbf220 100644 --- a/src/mingw/device.c +++ b/src/mingw/device.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: device.c,v 1.1.2.6 2003/07/29 22:59:01 guus Exp $ + $Id: device.c,v 1.1.2.7 2003/07/29 23:21:01 guus Exp $ */ #include "system.h" @@ -177,6 +177,8 @@ bool setup_device(void) len = sizeof(adaptername); RegQueryValueEx(key2, "Name", 0, 0, adaptername, &len); + RegKeyClose(key2); + if(device) { if(!strcmp(device, adapterid)) { found = true; @@ -201,6 +203,8 @@ bool setup_device(void) } } + RegKeyClose(key); + if(!found) { logger(LOG_ERR, _("No Windows tap device found!")); return false;