com php-src: don't leak handles: TSRM/tsrm_win32.c

From: Date: Mon, 05 Oct 2015 19:59:26 +0000
Subject: com php-src: don't leak handles: TSRM/tsrm_win32.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-89299@lists.php.net to get a copy of this message
Commit: d5bd999a8f33144ffbd19d5d45ba078dc77242da Author: Anatol Belski <ab@php.net> Sun, 4 Oct 2015 22:19:51 +0200 Parents: 3331d870aabe314ce8e7da6c5feb8f7566e34763 Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=d5bd999a8f33144ffbd19d5d45ba078dc77242da Log: don't leak handles Changed paths: M TSRM/tsrm_win32.c Diff: diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index 5b8b64a..9f900f2 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -612,6 +612,12 @@ TSRM_API int shmget(int key, int size, int flags) created = TRUE; } if (!shm_handle || !info_handle) { + if (shm_handle) { + CloseHandle(shm_handle); + } + if (info_handle) { + CloseHandle(info_handle); + } return -1; } } else {

« previous php.cvs (#89299) next »