[Pkg-owncloud-commits] [owncloud-client] 29/70: StateDB: Free locale string also if attribs are invalid.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Jul 1 10:21:20 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit e4f8a136f1172a60f1882edf82e7289b0d0a82a5
Author: Klaas Freitag <freitag at owncloud.com>
Date: Fri Jun 20 10:56:34 2014 +0200
StateDB: Free locale string also if attribs are invalid.
This fixes Coverity CID 12898
---
csync/src/csync_statedb.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/csync/src/csync_statedb.c b/csync/src/csync_statedb.c
index c593b42..0caf21c 100644
--- a/csync/src/csync_statedb.c
+++ b/csync/src/csync_statedb.c
@@ -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 & FILE_ATTRIBUTE_HIDDEN)) {
- SetFileAttributesW(fileName, dwAttrs | FILE_ATTRIBUTE_HIDDEN );
+ 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;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list