Fix for double free, possible fix for bug601.

In the end of execute_sescmd_in_backend the buffer was consumed
in case the protocol function failed. Or actually if it returned
something else but 1.

In the case of mysql_backend, the buffer is always freed when
authorizing and either consumed or placed on the dcb writequeue
when the data is written.

That is, it is never ok to consume the buffer in this function.
The end-result is likely to be an abort.
This commit is contained in:
Johan Wikman 2015-09-21 13:41:22 +03:00
parent de8e54da8b
commit 561891aac5

View File

@ -4243,7 +4243,6 @@ static bool execute_sescmd_in_backend(
}
else
{
while((buf = GWBUF_CONSUME_ALL(buf)) != NULL);
succp = false;
}
return_succp: