From: Christoph M. Becker Date: Sat, 12 Oct 2019 14:14:27 +0000 (+0200) Subject: Fix potential heap corruption X-Git-Tag: php-7.4.0RC4~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c10d3d3a35b54945456dcd6208d09c86dec32b56;p=php Fix potential heap corruption `tmp` is allocated by `malloc()`, so we must not `LocalFree()` it. --- diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 21538e92e1..dd0023f46c 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -659,7 +659,7 @@ char *sockets_strerror(int error) /* {{{ */ } SOCKETS_G(strerror_buf) = estrdup(tmp); - LocalFree(tmp); + free(tmp); buf = SOCKETS_G(strerror_buf); }