Avoid sequences of malloc(0) / free() by checking the length.

Matthieu Herrb requested to merge mherrb/xserver:master into master

This has an impact on heap fragmentation.

Signed-off-by: Matthieu Herrb matthieu.herrb@laas.fr

Edited by Peter Hutterer

Merge request reports