From:             manuel at mausz dot at
Operating system: Linux + Windows
PHP version:      5.2.6RC2
PHP Bug Type:     *General Issues
Bug description:  Memory leak in php_exec

Description:
------------
There's a memory leak in php_exec. The escaped command never gets freed.

--- ./ext/standard/exec.c.orig  2008-03-16 16:52:08.000000000 +0100
+++ ./ext/standard/exec.c       2008-03-16 16:51:54.000000000 +0100
@@ -116,6 +116,7 @@
 #else
        fp = VCWD_POPEN(cmd_p, "r");
 #endif
+       efree(cmd_p);
        if (!fp) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to
fork [%s]", cmd);
                goto err;



-- 
Edit bug report at http://bugs.php.net/?id=44446&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44446&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44446&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44446&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44446&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44446&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44446&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44446&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44446&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44446&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44446&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44446&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44446&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44446&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44446&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44446&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44446&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44446&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44446&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44446&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44446&r=mysqlcfg

Reply via email to