diff options
author | Shawn Routhier <sar@isc.org> | 2015-09-22 02:21:30 +0200 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2015-09-22 02:21:30 +0200 |
commit | 46dda2895ea38d8c6dbdc26112565201401f14f4 (patch) | |
tree | 9ae1e0508175611093a1e81dca442d351749f266 /src/hooks/dhcp/user_chk | |
parent | [master] Updated git hash (diff) | |
download | kea-46dda2895ea38d8c6dbdc26112565201401f14f4.tar.xz kea-46dda2895ea38d8c6dbdc26112565201401f14f4.zip |
[trac4001] Clear errno before calling OS functions
Diffstat (limited to 'src/hooks/dhcp/user_chk')
-rw-r--r-- | src/hooks/dhcp/user_chk/load_unload.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/hooks/dhcp/user_chk/load_unload.cc b/src/hooks/dhcp/user_chk/load_unload.cc index 4bba46e8e1..20ed539ce0 100644 --- a/src/hooks/dhcp/user_chk/load_unload.cc +++ b/src/hooks/dhcp/user_chk/load_unload.cc @@ -74,6 +74,10 @@ extern "C" { int load(LibraryHandle&) { // non-zero indicates an error. int ret_val = 0; + + // zero out the errno to be safe + errno = 0; + try { // Instantiate the registry. user_registry.reset(new UserRegistry()); |