summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c
index 8cfab4fe391..42e20915922 100644
--- a/xlators/features/changelog/lib/src/gf-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-changelog.c
@@ -160,9 +160,13 @@ gf_changelog_ctx_defaults_init(glusterfs_ctx_t *ctx)
return 0;
free_pool:
- GF_FREE(pool->frame_mem_pool);
+ if (pool) {
+ GF_FREE(pool->frame_mem_pool);
- GF_FREE(pool->stack_mem_pool);
+ GF_FREE(pool->stack_mem_pool);
+
+ GF_FREE(pool);
+ }
GF_FREE(ctx->stub_mem_pool);
@@ -174,8 +178,6 @@ free_pool:
GF_FREE(ctx->logbuf_pool);
- GF_FREE(pool);
-
GF_FREE(ctx->iobuf_pool);
GF_FREE(ctx->event_pool);