diff options
Diffstat (limited to 'ace/OS.cpp')
-rw-r--r-- | ace/OS.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ace/OS.cpp b/ace/OS.cpp index 425bcad3dbf..7b3879769f4 100644 --- a/ace/OS.cpp +++ b/ace/OS.cpp @@ -5244,12 +5244,12 @@ ACE_OS::rwlock_init (ACE_rwlock_t *rw, if (result == -1) { - int error = errno; + // Save/restore errno. + ACE_Errno_Guard error (errno); ACE_OS::mutex_destroy (&rw->lock_); ACE_OS::cond_destroy (&rw->waiting_readers_); ACE_OS::cond_destroy (&rw->waiting_writers_); ACE_OS::cond_destroy (&rw->waiting_important_writer_); - errno = error; } return result; # else |