mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-23 05:25:50 +03:00
Updater: Free tmp variable that might point to temp malloced memory
This fixes Coverity CID 12900
This commit is contained in:
parent
9ee86cf06b
commit
d0c992c991
1 changed files with 3 additions and 0 deletions
|
@ -274,6 +274,9 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
|||
} else {
|
||||
enum csync_vio_file_type_e tmp_vio_type = CSYNC_VIO_FILE_TYPE_UNKNOWN;
|
||||
|
||||
/* tmp might point to malloc mem, so free it here before reusing tmp */
|
||||
SAFE_FREE(tmp);
|
||||
|
||||
/* check if it's a file and has been renamed */
|
||||
if (ctx->current == LOCAL_REPLICA) {
|
||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Checking for rename based on inode # %" PRId64 "", (uint64_t) fs->inode);
|
||||
|
|
Loading…
Reference in a new issue