commit | 2a4b54359bff7b5c9ff6153026fb49bada325f1b | [log] [tgz] |
---|---|---|
author | Willy Tarreau <w@1wt.eu> | Mon Nov 24 11:39:34 2014 +0100 |
committer | Willy Tarreau <w@1wt.eu> | Wed Dec 24 23:47:32 2014 +0100 |
tree | bf72eb1763ec2448dad0ab9a97a785a2c52aba81 | |
parent | 7dfca9daec51f847d2e8ffa8236bd1e5ee9e8b08 [diff] |
MEDIUM: buffer: always assign a dummy empty buffer to channels Channels are now created with a valid pointer to a buffer before the buffer is allocated. This buffer is a global one called "buf_empty" and of size zero. Thus it prevents any activity from being performed on the buffer and still ensures that chn->buf may always be dereferenced. b_free() also resets the buffer to &buf_empty, and was split into b_drop() which does not reset the buffer.