]> granicus.if.org Git - php/commitdiff
This can not be true
authorXinchen Hui <laruence@php.net>
Thu, 2 Jul 2015 03:04:24 +0000 (11:04 +0800)
committerXinchen Hui <laruence@php.net>
Thu, 2 Jul 2015 03:04:24 +0000 (11:04 +0800)
ext/standard/file.c

index 7441831e025bb689fd16be7c746087619808fa6b..3087144d4473961fe3b1afdd904eeb3d1c5bd8e3 100644 (file)
@@ -1012,9 +1012,6 @@ PHPAPI PHP_FUNCTION(fgets)
                /* ask streams to give us a buffer of an appropriate size */
                buf = php_stream_get_line(stream, NULL, 0, &line_len);
                if (buf == NULL) {
-                       if (buf) {
-                               efree(buf);
-                       }
                        RETURN_FALSE;
                }
                // TODO: avoid reallocation ???