mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
lock: Fix unlink in error path.
This commit is contained in:
parent
9f802a83f3
commit
eb2b3438ba
@ -97,7 +97,9 @@ static int _csync_lock_create(const char *lockfile) {
|
||||
|
||||
out:
|
||||
close(fd);
|
||||
unlink(ctmpfile);
|
||||
if (ctmpfile) {
|
||||
unlink(ctmpfile);
|
||||
}
|
||||
|
||||
SAFE_FREE(buf);
|
||||
SAFE_FREE(dir);
|
||||
@ -177,4 +179,3 @@ void csync_lock_remove(const char *lockfile) {
|
||||
}
|
||||
}
|
||||
|
||||
/* vim: set ts=8 sw=2 et cindent: */
|
||||
|
||||
Loading…
Reference in New Issue
Block a user