From cb93db4647790f2014f17155f28cf32082025275 Mon Sep 17 00:00:00 2001 From: Markus Makela Date: Fri, 25 Nov 2016 23:18:33 +0200 Subject: [PATCH] Make a copy of the client request If the request isn't copied, the buffer will be freed twice. --- server/modules/routing/avro/avro_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/routing/avro/avro_client.c b/server/modules/routing/avro/avro_client.c index 6ab00117a..a26047fdf 100644 --- a/server/modules/routing/avro/avro_client.c +++ b/server/modules/routing/avro/avro_client.c @@ -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); } }