summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2015-09-24 14:26:15 +0200
committerAnatol Belski <ab@php.net>2015-09-24 16:33:58 +0200
commitdf832c966ce5c09a1c7dd557ebfb80f1dc181f4f (patch)
tree366bad8c8c12e1a33ca8837a827986ec2767161a
parent3ef3d80f2594c7bfb8c1d718a4a17f34f0e67e4f (diff)
downloadphp-git-df832c966ce5c09a1c7dd557ebfb80f1dc181f4f.tar.gz
avoid dangling pointers
-rw-r--r--ext/opcache/shared_alloc_win32.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ext/opcache/shared_alloc_win32.c b/ext/opcache/shared_alloc_win32.c
index 6ba608d773..b8e1a07896 100644
--- a/ext/opcache/shared_alloc_win32.c
+++ b/ext/opcache/shared_alloc_win32.c
@@ -329,10 +329,13 @@ static int detach_segment(zend_shared_segment *shared_segment)
zend_shared_alloc_lock_win32();
if (mapping_base) {
UnmapViewOfFile(mapping_base);
+ mapping_base = NULL;
}
CloseHandle(memfile);
+ memfile = NULL;
zend_shared_alloc_unlock_win32();
CloseHandle(memory_mutex);
+ memory_mutex = NULL;
return 0;
}