From b8bba93f08f20cd4230660ad736a76c89ef38113 Mon Sep 17 00:00:00 2001 From: Johan Wikman Date: Wed, 2 May 2018 10:37:03 +0300 Subject: [PATCH] MXS-1839 Do not leak memory from maxinfo "show sessions" When there is nothing more to show, the resultset user data must be freed. --- server/core/session.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/server/core/session.c b/server/core/session.c index 9a437aaca..860d98209 100644 --- a/server/core/session.c +++ b/server/core/session.c @@ -780,6 +780,10 @@ sessionRowCallback(RESULTSET *set, void *data) row = cbdata->row; cbdata->row = NULL; } + else + { + MXS_FREE(cbdata); + } return row; }