mirror of
https://github.com/php/php-src.git
synced 2025-08-16 14:08:47 +02:00
- Fixed possible memory leak
This commit is contained in:
parent
9fbfdb3396
commit
960b4e81f3
1 changed files with 1 additions and 0 deletions
|
@ -45,6 +45,7 @@ DIR *opendir(const char *dir)
|
||||||
|
|
||||||
dp = (DIR *) malloc(sizeof(DIR));
|
dp = (DIR *) malloc(sizeof(DIR));
|
||||||
if (dp == NULL) {
|
if (dp == NULL) {
|
||||||
|
free(filespec);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
dp->offset = 0;
|
dp->offset = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue