Spent some time with this, and found the cause. The error is a bit mis-leading, it's not a double-free-problem. Rather, it's a problem with the implementation failing to allocate space for null-termination when allocating buffer for an empty screen-line, therefore the connection to terminal size.
The allocation is most likely rounded up to even numbers, so for an odd number, the null-character will be allocated anyways (or the glib corruption-sensors only reacts on every odd byte).
Spent some time with this, and found the cause. The error is a bit mis-leading, it's not a double- free-problem. Rather, it's a problem with the implementation failing to allocate space for null-termination when allocating buffer for an empty screen-line, therefore the connection to terminal size.
The allocation is most likely rounded up to even numbers, so for an odd number, the null-character will be allocated anyways (or the glib corruption-sensors only reacts on every odd byte).
In any case, here's a patch that solves it.