Free memory of the exclude list in the csync destroy function.

This commit is contained in:
Andreas Schneider 2008-03-26 11:11:20 +01:00
parent 2e85f56393
commit 5ba9432548
3 changed files with 3 additions and 3 deletions

View file

@ -181,6 +181,8 @@ int csync_destroy(CSYNC *ctx) {
/* 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) {
csync_lock_remove(lock);
}

View file

@ -81,7 +81,6 @@ int csync_exclude_load(CSYNC *ctx, const char *fname) {
buf[i] = '\0';
if (*entry != '#' || *entry == '\n') {
CSYNC_LOG(CSYNC_LOG_PRIORITY_TRACE, "Adding entry: %s", entry);
printf("Adding entry: %s\n", entry);
csync_exclude_add(ctx, entry);
}
}

View file

@ -21,7 +21,6 @@ static void setup_init(void) {
}
static void teardown(void) {
csync_exclude_destroy(csync);
csync_destroy(csync);
system("rm -rf /tmp/check_csync");
}
@ -66,8 +65,8 @@ int main(void) {
SRunner *sr;
sr = srunner_create(s);
#if 0
srunner_set_fork_status(sr, CK_NOFORK);
#endif
srunner_set_fork_status(sr, CK_NOFORK);
srunner_run_all(sr, CK_VERBOSE);
nf = srunner_ntests_failed(sr);
srunner_free(sr);