mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 02:49:02 -04:00
Fix double free on failed directory listing in Windows
This commit is contained in:
parent
8c8e100e01
commit
03e941eb3d
1 changed files with 1 additions and 4 deletions
|
|
@ -1630,11 +1630,8 @@ static windows_dir* windows_opendir_stream(const char* dir)
|
|||
static struct windows_dirent* windows_readdir_stream(windows_dir* dirstream)
|
||||
{
|
||||
if (dirstream->state == DIR_STATE_EMPTY) {
|
||||
if (windows_next_stream(dirstream) != 0) {
|
||||
free(dirstream->buffer);
|
||||
free(dirstream);
|
||||
if (windows_next_stream(dirstream) != 0)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (dirstream->state == DIR_STATE_FILLED) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue