summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorSoumya Koduri <skoduri@redhat.com>2016-12-13 14:38:18 +0530
committerNiels de Vos <ndevos@redhat.com>2016-12-13 06:48:41 -0800
commit212c7600d2070a4414bc89fd7d2c186b5994cd54 (patch)
treeb4b418e3d14eecc863b359337e7fcba64b682732 /xlators
parent9b1c9395a397e337e4a0acac55b935cb1ce094b7 (diff)
upcall: Fix 'use after free' in a log message
There is chance of accessing freed pointer in a log message at TRACE level while cleaning up expired client entries. Change-Id: I06b4dad755df63978ab04ca52442bfd4600d139a BUG: 1404168 Reported-by: Ravishankar N <ravishankar@redhat.com> Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/16117 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/upcall/src/upcall-internal.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c
index 62e8b8f2938..84bde25ad58 100644
--- a/xlators/features/upcall/src/upcall-internal.c
+++ b/xlators/features/upcall/src/upcall-internal.c
@@ -258,6 +258,11 @@ upcall_cleanup_expired_clients (xlator_t *this,
up_client->access_time;
if (t_expired > (2*timeout)) {
+
+ gf_log (THIS->name, GF_LOG_TRACE,
+ "Cleaning up client_entry(%s)",
+ up_client->client_uid);
+
ret =
__upcall_cleanup_client_entry (up_client);
@@ -268,9 +273,6 @@ upcall_cleanup_expired_clients (xlator_t *this,
up_client);
goto out;
}
- gf_log (THIS->name, GF_LOG_TRACE,
- "Cleaned up client_entry(%s)",
- up_client->client_uid);
}
}
}