]> granicus.if.org Git - php/commitdiff
Fixed possible memory leak inside popen().
authorIlia Alshanetsky <iliaa@php.net>
Fri, 14 May 2004 16:12:03 +0000 (16:12 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 14 May 2004 16:12:03 +0000 (16:12 +0000)
ext/standard/file.c

index f650c5fb3da11cbba7a84f2174269af13e8f2973..420558a59eac735bfb6e5a041301991371f7bd8b 100644 (file)
@@ -838,6 +838,7 @@ PHP_FUNCTION(popen)
 
                if (!fp) {
                        php_error_docref2(NULL TSRMLS_CC, buf, p, E_WARNING, "%s", strerror(errno));
+                       efree(p);
                        RETURN_FALSE;
                }
        } else {