mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 15:06:08 +03:00
StateDB: Free locale string also if attribs are invalid.
This fixes Coverity CID 12898
This commit is contained in:
parent
c263c38cdf
commit
e4f8a136f1
1 changed files with 4 additions and 6 deletions
|
@ -69,13 +69,11 @@ static void _csync_win32_hide_file( const char *file ) {
|
|||
fileName = c_utf8_to_locale( file );
|
||||
dwAttrs = GetFileAttributesW(fileName);
|
||||
|
||||
if (dwAttrs==INVALID_FILE_ATTRIBUTES) goto cleanup;
|
||||
|
||||
if (dwAttrs != INVALID_FILE_ATTRIBUTES) {
|
||||
if (!(dwAttrs & FILE_ATTRIBUTE_HIDDEN)) {
|
||||
SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
|
||||
}
|
||||
|
||||
cleanup:
|
||||
}
|
||||
c_free_locale_string(fileName);
|
||||
#else
|
||||
(void) file;
|
||||
|
|
Loading…
Reference in a new issue