Fix resource leaks

... pointed out by Eclipse.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'master' of github.com:fiji/fiji