Fix mem-leak and stabilize under lsan

Extract of !2124

0483f31f is the more important commit: it is an actual mem-leak affecting users.

The individual commits are very small and should be clear by themselves.

Edited by Méven Car

Merge request reports

Loading