summaryrefslogtreecommitdiff
path: root/shmem/win32/shm.c
diff options
context:
space:
mode:
authordavi <davi@13f79535-47bb-0310-9956-ffa450edef68>2007-10-12 23:43:14 +0000
committerdavi <davi@13f79535-47bb-0310-9956-ffa450edef68>2007-10-12 23:43:14 +0000
commitbfc4581f90ebdcc18a5b0f222b0b8537092ff707 (patch)
treefd81b5890737cbe5ad5c64fe70dfd696465f85f3 /shmem/win32/shm.c
parentc9907aff81db0112f7cedd69419a12f8b4839ccc (diff)
downloadlibapr-bfc4581f90ebdcc18a5b0f222b0b8537092ff707.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: http://svn.apache.org/repos/asf/apr/apr/trunk@584331 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'shmem/win32/shm.c')
-rw-r--r--shmem/win32/shm.c4
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?