[Pkg-owncloud-commits] [owncloud-client] 228/332: csync oC Util: set field flag correctly to avoid etag memleak.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu Aug 14 21:07:04 UTC 2014
This is an automated email from the git hooks/post-receive script.
hefee-guest pushed a commit to branch master
in repository owncloud-client.
commit 77e3480b2f0b0be7694e46ce67d611e290497340
Author: Klaas Freitag <freitag at owncloud.com>
Date: Mon Jul 21 13:19:36 2014 +0200
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.
---
csync/src/csync_owncloud_util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/csync/src/csync_owncloud_util.c b/csync/src/csync_owncloud_util.c
index 1a07a28..af64ff6 100644
--- a/csync/src/csync_owncloud_util.c
+++ b/csync/src/csync_owncloud_util.c
@@ -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));
}
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git
More information about the Pkg-owncloud-commits
mailing list