From cfcd0fa6f71af4e224c1d86be55b6b01f2288be2 Mon Sep 17 00:00:00 2001 From: Wen Hui Date: Wed, 6 Jan 2021 14:20:53 -0500 Subject: [PATCH] fix memory leak in processInlineBuffer error handling code (#8295) This code path is normally executed only when v6.0 and above replicates from v2.4 --- src/networking.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/networking.c b/src/networking.c index 29e5605d9..acb1b27cb 100644 --- a/src/networking.c +++ b/src/networking.c @@ -1734,6 +1734,7 @@ int processInlineBuffer(client *c) { * However the is an exception: masters may send us just a newline * to keep the connection active. */ if (querylen != 0 && c->flags & CLIENT_MASTER) { + sdsfreesplitres(argv,argc); serverLog(LL_WARNING,"WARNING: Receiving inline protocol from master, master stream corruption? Closing the master connection and discarding the cached master."); setProtocolError("Master using the inline protocol. Desync?",c); return C_ERR;