]> granicus.if.org Git - php/commitdiff
Fixed a memory leak inside readline_completion_function() on non-callable
authorIlia Alshanetsky <iliaa@php.net>
Mon, 12 Feb 2007 01:23:17 +0000 (01:23 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Mon, 12 Feb 2007 01:23:17 +0000 (01:23 +0000)
callback.

ext/readline/readline.c

index 14f2cf3fb25ace4aca14cdebc815a3002096004e..d4d42582d23f6cd44c01d1179a98667a25308b7e 100644 (file)
@@ -453,6 +453,7 @@ PHP_FUNCTION(readline_completion_function)
 
        if (!zend_is_callable(arg, 0, &name)) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s is not callable", name);
+               efree(name);
                RETURN_FALSE;
        }