Fix more resource leaks identified by Eclipse

This is a companion patch to the earlier fix for the updater test
failures on Windows.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>