mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
fix leak
This commit is contained in:
parent
14cd14ddaf
commit
88f6706656
1 changed files with 2 additions and 0 deletions
|
@ -54,12 +54,14 @@ DIR *opendir(const char *dir)
|
||||||
|
|
||||||
resolvedw = php_win32_ioutil_conv_any_to_w(resolved_path_buff, PHP_WIN32_CP_IGNORE_LEN, &resolvedw_len);
|
resolvedw = php_win32_ioutil_conv_any_to_w(resolved_path_buff, PHP_WIN32_CP_IGNORE_LEN, &resolvedw_len);
|
||||||
if (!resolvedw) {
|
if (!resolvedw) {
|
||||||
|
free(dp);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
filespecw_len = resolvedw_len + 2;
|
filespecw_len = resolvedw_len + 2;
|
||||||
filespecw = (wchar_t *)malloc((filespecw_len + 1)*sizeof(wchar_t));
|
filespecw = (wchar_t *)malloc((filespecw_len + 1)*sizeof(wchar_t));
|
||||||
if (filespecw == NULL) {
|
if (filespecw == NULL) {
|
||||||
|
free(dp);
|
||||||
free(resolvedw);
|
free(resolvedw);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue