fix one of the earlier memleaks reported by Martin Kluge