com php-src: ensure the mail() socket is not leaked after request: win32/globals.c

From: Date: Wed, 04 Mar 2015 09:24:44 +0000
Subject: com php-src: ensure the mail() socket is not leaked after request: win32/globals.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-85198@lists.php.net to get a copy of this message
Commit: fc5d9175b6b8b7001f06e85138660ca27bd8ef9e Author: Anatol Belski <ab@php.net> Wed, 4 Mar 2015 10:22:51 +0100 Parents: c16dcd3a8eff73c5ff8f1022cb7d693bd04845c7 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=fc5d9175b6b8b7001f06e85138660ca27bd8ef9e Log: ensure the mail() socket is not leaked after request Changed paths: M win32/globals.c Diff: diff --git a/win32/globals.c b/win32/globals.c index dc7c9f8..69dc5ef 100644 --- a/win32/globals.c +++ b/win32/globals.c @@ -32,6 +32,8 @@ void php_win32_core_globals_ctor(void *vg) { php_win32_core_globals *wg = (php_win32_core_globals*)vg; memset(wg, 0, sizeof(*wg)); + + wg->mail_socket = INVALID_SOCKET; } void php_win32_core_globals_dtor(void *vg) @@ -51,6 +53,10 @@ void php_win32_core_globals_dtor(void *vg) free(wg->registry_directories); wg->registry_directories = NULL; } + + if (INVALID_SOCKET != wg->mail_socket) { + closesocket(wg->mail_socket); + } }

« previous php.cvs (#85198) next »