summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/features/changelog/lib/src/gf-history-changelog.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/features/changelog/lib/src/gf-history-changelog.c b/xlators/features/changelog/lib/src/gf-history-changelog.c
index 0c2320097d4..b0ec2b0bb04 100644
--- a/xlators/features/changelog/lib/src/gf-history-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-history-changelog.c
@@ -798,6 +798,12 @@ gf_history_changelog (char* changelog_dir, unsigned long start,
pthread_attr_t attr;
+ this = THIS;
+ if (!this) {
+ ret = -1;
+ goto out;
+ }
+
ret = pthread_attr_init (&attr);
if (ret != 0) {
gf_msg (this->name, GF_LOG_ERROR, errno,
@@ -806,12 +812,6 @@ gf_history_changelog (char* changelog_dir, unsigned long start,
return -1;
}
- this = THIS;
- if (!this) {
- ret = -1;
- goto out;
- }
-
jnl = (gf_changelog_journal_t *) GF_CHANGELOG_GET_API_PTR (this);
if (!jnl) {
ret = -1;