Merge pull request #1171 in FS/freeswitch from ~CJYOUNG/freeswitch:bugfix/FS-9984-handle-leak-in-mod_enum to master

* commit '7e85fafc0eed1969aa4049ef9a449d251982fd77':
  FS-9984 [mod_enum] Fix for handle leak in Windows
This commit is contained in:
Mike Jerris 2017-02-02 15:29:21 -06:00
commit b0143d3209
1 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,6 @@ static switch_status_t load_config(void)
buf = (char*)malloc(data_sz + 1);
RegQueryValueEx(hKey, "DhcpNameServer", NULL, NULL, (LPBYTE)buf, &data_sz);
RegCloseKey(hKey);
if(buf[data_sz - 1] != 0) {
buf[data_sz] = 0;
@ -183,6 +182,8 @@ static switch_status_t load_config(void)
switch_replace_char(buf, ' ', 0, SWITCH_FALSE); /* only use the first entry ex "192.168.1.1 192.168.1.2" */
globals.nameserver[0] = buf;
}
RegCloseKey(hKey);
}
}
#endif