Updater: Free tmp variable that might point to temp malloced memory

This fixes Coverity CID 12900
This commit is contained in:
Klaas Freitag 2014-06-20 10:41:01 +02:00
parent 9ee86cf06b
commit d0c992c991

View file

@ -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);