char-device: Add a comment to red_char_device_write_buffer_free

It's a bit surprising that buf is not freed too so explain it.

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2019-09-11 14:55:13 +01:00
parent 5bcfc2b5d5
commit 321caf8760

View File

@ -158,6 +158,8 @@ static void red_char_device_write_buffer_free(RedCharDeviceWriteBuffer *buf)
if (buf) {
g_free(buf->priv);
}
/* NOTE: do not free buf. buf was contained into a larger structure
* which contained both private and public part and was freed above */
}
static void write_buffers_queue_free(GQueue *write_queue)