From 7fb85e3670cb4743436fd2cf0fbbf9c0869728ec Mon Sep 17 00:00:00 2001 From: Michael Adam Date: Wed, 15 Apr 2015 08:34:13 +0200 Subject: upcall: fix use-after free (CID 1288760, 1288761) Coverity IDs: 1288760 - Read from pointer after free 1288761 - Use after free. Change-Id: Ide9405b9c30a3e27941054a4ae61f585ef09cd8c BUG: 789278 Signed-off-by: Michael Adam Reviewed-on: http://review.gluster.org/10242 Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: soumya k Reviewed-by: Niels de Vos --- xlators/features/upcall/src/upcall-internal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c index 29c387601f9..41548afb930 100644 --- a/xlators/features/upcall/src/upcall-internal.c +++ b/xlators/features/upcall/src/upcall-internal.c @@ -434,14 +434,14 @@ upcall_client_cache_invalidate (xlator_t *this, uuid_t gfid, up_client_entry->client_uid); } else { + gf_log (THIS->name, GF_LOG_TRACE, + "Cache invalidation notification NOT sent to %s", + up_client_entry->client_uid); + if (t_expired > (2*timeout)) { /* Cleanup the entry */ __upcall_cleanup_client_entry (up_client_entry); } - - gf_log (THIS->name, GF_LOG_TRACE, - "Cache invalidation notification NOT sent to %s", - up_client_entry->client_uid); } } -- cgit