Commit f1d56c98 authored by Wen Hui's avatar Wen Hui Committed by Oran Agra
Browse files

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

(cherry picked from commit cfcd0fa6)
parent ea595784
...@@ -1634,6 +1634,7 @@ int processInlineBuffer(client *c) { ...@@ -1634,6 +1634,7 @@ int processInlineBuffer(client *c) {
* However the is an exception: masters may send us just a newline * However the is an exception: masters may send us just a newline
* to keep the connection active. */ * to keep the connection active. */
if (querylen != 0 && c->flags & CLIENT_MASTER) { 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."); 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); setProtocolError("Master using the inline protocol. Desync?",c);
return C_ERR; return C_ERR;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment