wmail: fixed NULL-pointer dereference if opendir(3) fails.
Code was: if (( dir = opendir( ... ))) { // ... } closedir( dir ); // dir may be NULL Moved closedir(3) inside if-block.
This commit is contained in:
parent
2ae0c7cba4
commit
40d7eb504c
|
@ -981,9 +981,9 @@ static int TraverseDirectory( const char *name, bool isNewMail )
|
|||
}
|
||||
free( fullName );
|
||||
}
|
||||
}
|
||||
|
||||
closedir( dir );
|
||||
closedir( dir );
|
||||
}
|
||||
|
||||
return mails;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue