From 89bd05106e5823fc5cfca9abf082729f2444363b Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 4 Jun 2010 21:09:35 -0400 Subject: record: move free() to after last use of pContext No functional change, since free doesn't change the value of the pointer passed to it, but it makes this code less confusing. Reviewed-by: Jamey Sharp Signed-off-by: Matt Turner --- record/record.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'record') diff --git a/record/record.c b/record/record.c index 53bdfec71..4117a5a02 100644 --- a/record/record.c +++ b/record/record.c @@ -2520,8 +2520,6 @@ RecordDeleteContext(pointer value, XID id) } } - free(pContext); - /* remove context from AllContexts list */ if (-1 != (i = RecordFindContextOnAllContexts(pContext))) @@ -2533,6 +2531,8 @@ RecordDeleteContext(pointer value, XID id) ppAllContexts = NULL; } } + free(pContext); + return Success; } /* RecordDeleteContext */ -- cgit v1.2.3