Fix bug 528 - wrong service name in tee fitler crashes MaxScale
This commit is contained in:
@ -311,7 +311,8 @@ int i;
|
|||||||
* @param filter The filter to add into the chain
|
* @param filter The filter to add into the chain
|
||||||
* @param session The client session
|
* @param session The client session
|
||||||
* @param downstream The filter downstream of this filter
|
* @param downstream The filter downstream of this filter
|
||||||
* @return The downstream component for the next filter
|
* @return The downstream component for the next filter or NULL
|
||||||
|
* if the filter could not be created
|
||||||
*/
|
*/
|
||||||
DOWNSTREAM *
|
DOWNSTREAM *
|
||||||
filterApply(FILTER_DEF *filter, SESSION *session, DOWNSTREAM *downstream)
|
filterApply(FILTER_DEF *filter, SESSION *session, DOWNSTREAM *downstream)
|
||||||
@ -331,8 +332,13 @@ DOWNSTREAM *me;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (filter->filter == NULL)
|
if (filter->filter == NULL)
|
||||||
filter->filter = (filter->obj->createInstance)(filter->options,
|
{
|
||||||
filter->parameters);
|
if ((filter->filter = (filter->obj->createInstance)(filter->options,
|
||||||
|
filter->parameters)) == NULL)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
if ((me = (DOWNSTREAM *)calloc(1, sizeof(DOWNSTREAM))) == NULL)
|
if ((me = (DOWNSTREAM *)calloc(1, sizeof(DOWNSTREAM))) == NULL)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|||||||
@ -320,12 +320,14 @@ SESSION *bsession;
|
|||||||
|
|
||||||
if (my_session->active)
|
if (my_session->active)
|
||||||
{
|
{
|
||||||
bsession = my_session->branch_session;
|
if ((bsession = my_session->branch_session) != NULL)
|
||||||
router = bsession->service->router;
|
{
|
||||||
router_instance = bsession->service->router_instance;
|
router = bsession->service->router;
|
||||||
rsession = bsession->router_session;
|
router_instance = bsession->service->router_instance;
|
||||||
/** Close router session and all its connections */
|
rsession = bsession->router_session;
|
||||||
router->closeSession(router_instance, rsession);
|
/** Close router session and all its connections */
|
||||||
|
router->closeSession(router_instance, rsession);
|
||||||
|
}
|
||||||
dcb_free(my_session->branch_dcb);
|
dcb_free(my_session->branch_dcb);
|
||||||
/* No need to free the session, this is done as
|
/* No need to free the session, this is done as
|
||||||
* a side effect of closing the client DCB of the
|
* a side effect of closing the client DCB of the
|
||||||
|
|||||||
Reference in New Issue
Block a user