diff options
| -rw-r--r-- | windows/windns/src/windns/windns.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/windows/windns/src/windns/windns.cpp b/windows/windns/src/windns/windns.cpp index 26e891521d..72db7a00b8 100644 --- a/windows/windns/src/windns/windns.cpp +++ b/windows/windns/src/windns/windns.cpp @@ -255,6 +255,12 @@ WinDns_Set( return false; } + if (nullptr == interfaceAlias) + { + g_LogSink->error("Invalid argument: interfaceAlias"); + return false; + } + // // Check the settings on the adapter. // If it already has the exact same settings we need, we're done. @@ -277,12 +283,12 @@ WinDns_Set( return true; } } - catch (const std::exception & ex) + catch (const std::exception &err) { std::stringstream ss; ss << "Failed to evaluate DNS settings on adapter with alias \"" - << common::string::ToAnsi(interfaceAlias) << "\": " << ex.what(); + << common::string::ToAnsi(interfaceAlias) << "\": " << err.what(); g_LogSink->info(ss.str().c_str()); } |
