]> granicus.if.org Git - php/commitdiff
Avoid a potential double-free here
authorRasmus Lerdorf <rasmus@php.net>
Sat, 6 Aug 2011 23:42:52 +0000 (23:42 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Sat, 6 Aug 2011 23:42:52 +0000 (23:42 +0000)
sapi/cli/php_cli_server.c

index 0c5fb9cd1f691f0f4d8e3326d63ea6663a610617..6c725a7814bca7e0ec001c8fee4b958868ec38bf 100644 (file)
@@ -910,6 +910,7 @@ static int php_network_listen_socket(const char *host, int *port, int socktype,
        for (p = sal; *p; p++) {
                if (sa) {
                        pefree(sa, 1);
+                       sa = NULL;
                }
 
                retval = socket((*p)->sa_family, socktype, 0);