diff --git a/ext/standard/filestat.c b/ext/standard/filestat.c index 2aa7051a2cb..3e9f8b735ed 100644 --- a/ext/standard/filestat.c +++ b/ext/standard/filestat.c @@ -107,9 +107,11 @@ PHP_RSHUTDOWN_FUNCTION(filestat) { if (BG(CurrentStatFile)) { efree (BG(CurrentStatFile)); + BG(CurrentStatFile) = NULL; } if (BG(CurrentLStatFile)) { efree (BG(CurrentLStatFile)); + BG(CurrentLStatFile) = NULL; } return SUCCESS; }