Fix debug assertion on readq prepend
If data was prepended to the readq while it was empty, the debug assertion in gwbuf_append that checks the tail pointer would be hit.
This commit is contained in:
parent
9ce788ff0b
commit
9b0b152109
@ -342,7 +342,7 @@ static unsigned int dcb_readq_length(DCB* dcb)
|
||||
*/
|
||||
static inline void dcb_readq_prepend(DCB* dcb, GWBUF* buffer)
|
||||
{
|
||||
dcb->readq = gwbuf_append(buffer, dcb->readq);
|
||||
dcb->readq = dcb->readq ? gwbuf_append(buffer, dcb->readq) : buffer;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user