Make a copy of the client request

If the request isn't copied, the buffer will be freed twice.
This commit is contained in:
Markus Makela 2016-11-25 23:18:33 +02:00
parent 1432677406
commit cb93db4647

View File

@ -505,7 +505,7 @@ avro_client_process_command(AVRO_INSTANCE *router, AVRO_CLIENT *client, GWBUF *q
{
GWBUF *reply = gwbuf_alloc(5);
memcpy(GWBUF_DATA(reply), "ECHO:", 5);
reply = gwbuf_append(reply, queue);
reply = gwbuf_append(reply, gwbuf_clone(queue));
client->dcb->func.write(client->dcb, reply);
}
}