clean up memory if shape measurement in RunFDNT() fails
(#25)