diff options
author | David Kahles <david.kahles96@gmail.com> | 2016-01-22 12:34:07 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-02-09 10:35:16 +0100 |
commit | 7a6b25ad2166ee0a048020fdd1d483eb29787c84 (patch) | |
tree | cb514a752aca27b961fe0c96441a590b2776da1f | |
parent | 870be18d2168a1d0e0d7591ef9a61d123dd4e255 (diff) | |
download | csync-7a6b25ad2166ee0a048020fdd1d483eb29787c84.tar.gz csync-7a6b25ad2166ee0a048020fdd1d483eb29787c84.tar.xz csync-7a6b25ad2166ee0a048020fdd1d483eb29787c84.zip |
Delete directory name after using it
On Windows or with iconv, the string would have been deleted before we
create the directory. Though the mkdir() function would fail.
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
-rw-r--r-- | src/std/c_dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/std/c_dir.c b/src/std/c_dir.c index ef7fb89..fa8a096 100644 --- a/src/std/c_dir.c +++ b/src/std/c_dir.c @@ -91,9 +91,9 @@ int c_mkdirs(const char *path, mode_t mode) { return -1; } } - c_free_locale_string(wpath); tmp = _tmkdir(wpath, mode); + c_free_locale_string(wpath); if ((tmp < 0) && (errno == EEXIST)) { return 0; |