Use gwbuf_make_contiguous only with non-NULL buffers
A NULL buffer should never be made contiguous as that points to a flaw in program logic.
This commit is contained in:
parent
37f32464f2
commit
896c7deb03
@ -1600,11 +1600,11 @@ static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF
|
||||
// Process client request one packet at a time
|
||||
packetbuf = modutil_get_next_MySQL_packet(p_readbuf);
|
||||
|
||||
// TODO: Do this only when RCAP_TYPE_CONTIGUOUS_INPUT is requested
|
||||
packetbuf = gwbuf_make_contiguous(packetbuf);
|
||||
|
||||
if (packetbuf != NULL)
|
||||
{
|
||||
// TODO: Do this only when RCAP_TYPE_CONTIGUOUS_INPUT is requested
|
||||
packetbuf = gwbuf_make_contiguous(packetbuf);
|
||||
|
||||
CHK_GWBUF(packetbuf);
|
||||
MySQLProtocol* proto = (MySQLProtocol*)session->client_dcb->protocol;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user