csync oC Util: set field flag correctly to avoid etag memleak.

The fields varialbe should contain or'ed flags of the fields set
in the csync_vio_file_stat_t struct. The problem was that the field
for CSYNC_VIO_FILE_STAT_FIELDS_PERM was assigned rather than or'ed
which makes the release function for the struct not freeing the
etag memory => memleak.
This commit is contained in:
Klaas Freitag 2014-07-21 13:19:36 +02:00 committed by Markus Goetz
parent 21783ecef7
commit 12f5e4b46e

View File

@ -318,7 +318,7 @@ void resourceToFileStat(csync_vio_file_stat_t *lfs, struct resource *res )
lfs->directDownloadCookies = c_strdup(res->directDownloadCookies);
}
if (strlen(res->remotePerm) > 0) {
lfs->fields = CSYNC_VIO_FILE_STAT_FIELDS_PERM;
lfs->fields |= CSYNC_VIO_FILE_STAT_FIELDS_PERM;
strncpy(lfs->remotePerm, res->remotePerm, sizeof(lfs->remotePerm));
}
}