valgrind detected two memory leaks:
1) quota context is not released after merging.
2) @refcount_orig should be released
E2fsprogs-commit:
d9aa090f713ecf3393c4e68d951a03ccba4a7073
Change-Id: I8b8379505524d25b5c18a0d67bb4dd8ede3494ef
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
ea_refcount_free(ctx->refcount_extra);
ctx->refcount_extra = 0;
}
+ if (ctx->refcount_orig) {
+ ea_refcount_free(ctx->refcount_orig);
+ ctx->refcount_orig = 0;
+ }
if (ctx->ea_block_quota_blocks) {
ea_refcount_free(ctx->ea_block_quota_blocks);
ctx->ea_block_quota_blocks = 0;
fclose(thread_ctx->problem_logf);
}
+ quota_release_context(&thread_ctx->qctx);
/*
* @block_metadata_map and @block_dup_map are
* shared, so we don't free them.