diff --git a/ext/standard/file.c b/ext/standard/file.c index 7441831e025..3087144d447 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -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 ???