]> granicus.if.org Git - php/commitdiff
Fix memory leak when phpdbg fails to start up
authorThomas Punt <tpunt@php.net>
Thu, 26 Apr 2018 15:39:52 +0000 (16:39 +0100)
committerThomas Punt <tpunt@php.net>
Thu, 26 Apr 2018 15:39:52 +0000 (16:39 +0100)
sapi/phpdbg/phpdbg.c

index c0152b1f756069adf59421b66fd7e8245a276ab8..abb2e388682c358d1ca6b611bc19913d284a3464 100644 (file)
@@ -1809,6 +1809,11 @@ phpdbg_main:
 
                if (php_request_startup() == FAILURE) {
                        PUTS("Could not startup");
+#ifndef _WIN32
+                       if (address) {
+                               free(address);
+                       }
+#endif
                        return 1;
                }