diff options
author | Davi Arnaut <davi@apache.org> | 2007-10-12 23:43:14 +0000 |
---|---|---|
committer | Davi Arnaut <davi@apache.org> | 2007-10-12 23:43:14 +0000 |
commit | 79ca8b519c5f207763713538d90aeda067617cf3 (patch) | |
tree | fd81b5890737cbe5ad5c64fe70dfd696465f85f3 /shmem | |
parent | a8989c79fb55a63eea60a2896789c21d58873529 (diff) | |
download | apr-79ca8b519c5f207763713538d90aeda067617cf3.tar.gz |
The calls to UnmapViewOfFile() and CloseHandle() in the shm_cleanup()
routine in the win32/shm.c source are not properly checking for errors.
They currently assume a non-zero return is an error.Whereas these windows
calls return non-zero on success and zero on failure.
PR: 43065
Submitted by: Joe Mudd
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@584331 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem')
-rw-r--r-- | shmem/win32/shm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/shmem/win32/shm.c b/shmem/win32/shm.c index a7260bdb2..7bce1331b 100644 --- a/shmem/win32/shm.c +++ b/shmem/win32/shm.c @@ -40,10 +40,10 @@ static apr_status_t shm_cleanup(void* shm) apr_status_t rv = APR_SUCCESS; apr_shm_t *m = shm; - if (UnmapViewOfFile(m->memblk)) { + if (!UnmapViewOfFile(m->memblk)) { rv = apr_get_os_error(); } - if (CloseHandle(m->hMap)) { + if (!CloseHandle(m->hMap)) { return (rv != APR_SUCCESS) ? rv : apr_get_os_error(); } /* ### Do we want to make a point of unlinking m->file here? |