Fix gwbuf_apped assertion on writeq drain
The DCB writeq would be the tail pointer and it would be NULL.
This commit is contained in:
parent
6667dbed18
commit
c4fff21909
@ -272,7 +272,7 @@ extern int gwbuf_compare(const GWBUF* lhs, const GWBUF* rhs);
|
||||
* Append a buffer onto a linked list of buffer structures.
|
||||
*
|
||||
* @param head The current head of the linked list or NULL.
|
||||
* @param tail Another buffer to make the tail of the linked list
|
||||
* @param tail Another buffer to make the tail of the linked list, must not be NULL
|
||||
*
|
||||
* @return The new head of the linked list
|
||||
*/
|
||||
|
@ -986,7 +986,7 @@ int dcb_drain_writeq(DCB* dcb)
|
||||
*/
|
||||
if (stop_writing)
|
||||
{
|
||||
dcb->writeq = gwbuf_append(local_writeq, dcb->writeq);
|
||||
dcb->writeq = dcb->writeq ? gwbuf_append(local_writeq, dcb->writeq) : local_writeq;
|
||||
local_writeq = NULL;
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user