Fix memleak with id_list - WIP

This commit is contained in:
Klaas Freitag 2013-04-20 13:06:59 +03:00
parent 275c18df82
commit a496bb0e13

View file

@ -153,6 +153,11 @@ int csync_create(CSYNC **csync, const char *local, const char *remote) {
return -1;
}
ctx->local.list = 0;
ctx->local.id_list = 0;
ctx->remote.list = 0;
ctx->remote.id_list = 0;
*csync = ctx;
return 0;
}
@ -757,10 +762,10 @@ int csync_commit(CSYNC *ctx) {
/* free memory */
c_rbtree_free(ctx->local.tree);
c_list_free(ctx->local.list);
c_list_free(ctx->local.id_list);
// c_list_free(ctx->local.id_list);
c_rbtree_free(ctx->remote.tree);
c_list_free(ctx->remote.list);
c_list_free(ctx->remote.id_list);
// c_list_free(ctx->remote.id_list);
/* create/load statedb */
if (! csync_is_statedb_disabled(ctx)) {