mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-23 21:05:44 +03:00
Free memory of the exclude list in the csync destroy function.
This commit is contained in:
parent
2e85f56393
commit
5ba9432548
3 changed files with 3 additions and 3 deletions
|
@ -181,6 +181,8 @@ int csync_destroy(CSYNC *ctx) {
|
||||||
/* TODO if we successfully synchronized, overwrite the original journal */
|
/* TODO if we successfully synchronized, overwrite the original journal */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
csync_exclude_destroy(ctx);
|
||||||
|
|
||||||
if (asprintf(&lock, "%s/%s", ctx->options.config_dir, CSYNC_LOCK_FILE) > 0) {
|
if (asprintf(&lock, "%s/%s", ctx->options.config_dir, CSYNC_LOCK_FILE) > 0) {
|
||||||
csync_lock_remove(lock);
|
csync_lock_remove(lock);
|
||||||
}
|
}
|
||||||
|
|
|
@ -81,7 +81,6 @@ int csync_exclude_load(CSYNC *ctx, const char *fname) {
|
||||||
buf[i] = '\0';
|
buf[i] = '\0';
|
||||||
if (*entry != '#' || *entry == '\n') {
|
if (*entry != '#' || *entry == '\n') {
|
||||||
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", entry);
|
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", entry);
|
||||||
printf("Adding entry: %s\n", entry);
|
|
||||||
csync_exclude_add(ctx, entry);
|
csync_exclude_add(ctx, entry);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,6 @@ static void setup_init(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static void teardown(void) {
|
static void teardown(void) {
|
||||||
csync_exclude_destroy(csync);
|
|
||||||
csync_destroy(csync);
|
csync_destroy(csync);
|
||||||
system("rm -rf /tmp/check_csync");
|
system("rm -rf /tmp/check_csync");
|
||||||
}
|
}
|
||||||
|
@ -66,8 +65,8 @@ int main(void) {
|
||||||
SRunner *sr;
|
SRunner *sr;
|
||||||
sr = srunner_create(s);
|
sr = srunner_create(s);
|
||||||
#if 0
|
#if 0
|
||||||
srunner_set_fork_status(sr, CK_NOFORK);
|
|
||||||
#endif
|
#endif
|
||||||
|
srunner_set_fork_status(sr, CK_NOFORK);
|
||||||
srunner_run_all(sr, CK_VERBOSE);
|
srunner_run_all(sr, CK_VERBOSE);
|
||||||
nf = srunner_ntests_failed(sr);
|
nf = srunner_ntests_failed(sr);
|
||||||
srunner_free(sr);
|
srunner_free(sr);
|
||||||
|
|
Loading…
Reference in a new issue