Fixing "resource leak" warning.

Signed-off-by: Erik de Bruin <erik@ixsoftware.nl>