]> granicus.if.org Git - php/commitdiff
Fix potential heap corruption
authorChristoph M. Becker <cmbecker69@gmx.de>
Sat, 12 Oct 2019 14:14:27 +0000 (16:14 +0200)
committerChristoph M. Becker <cmbecker69@gmx.de>
Sat, 12 Oct 2019 14:16:14 +0000 (16:16 +0200)
`tmp` is allocated by `malloc()`, so we must not `LocalFree()` it.

ext/sockets/sockets.c

index 21538e92e10f9104fd89e178907ad8ed2d6ced62..dd0023f46c29225d67fadfc2f8d46b590756072e 100644 (file)
@@ -659,7 +659,7 @@ char *sockets_strerror(int error) /* {{{ */
                        }
 
                        SOCKETS_G(strerror_buf) = estrdup(tmp);
-                       LocalFree(tmp);
+                       free(tmp);
 
                        buf = SOCKETS_G(strerror_buf);
                }