MXS-1740 Hintfilter leaks memory
Single spot where an existing hint ptr was overwritten. Removed gwbuf_add_hint() because it was adding hints at the opposite end compared to functions in hint.h. Added hint_splice() to replace.
This commit is contained in:
@ -208,8 +208,11 @@ routeQuery(MXS_FILTER *instance, MXS_FILTER_SESSION *session, GWBUF *queue)
|
||||
{
|
||||
my_session->request = NULL;
|
||||
my_session->query_len = 0;
|
||||
HINT *hint = hint_parser(my_session, queue);
|
||||
queue->hint = hint;
|
||||
HINT *new_hint = hint_parser(my_session, queue);
|
||||
if (new_hint)
|
||||
{
|
||||
queue->hint = hint_splice(queue->hint, new_hint);
|
||||
}
|
||||
}
|
||||
|
||||
/* Now process the request */
|
||||
|
||||
Reference in New Issue
Block a user