From f9ba8e0c066f58c8d9f2b10db4306f42470fe7a2 Mon Sep 17 00:00:00 2001 From: srit Date: Thu, 4 Nov 2010 18:22:44 +0000 Subject: [PATCH] Corrected erroneous free when a real RECTILINEAR field is detected --- common/clitkXdrImageIOReader.cxx | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/common/clitkXdrImageIOReader.cxx b/common/clitkXdrImageIOReader.cxx index bc3a24a..6f70244 100644 --- a/common/clitkXdrImageIOReader.cxx +++ b/common/clitkXdrImageIOReader.cxx @@ -683,6 +683,7 @@ int clitk::XdrImageIO::ReadImageInformationWithError() } } + float *p = points; switch (field) { case UNIFORM: for (i=0; i0.1) { + if (fabs((p[j+1]-p[j])*10-GetSpacing(i))>0.1) { free(points); fclose(fstream); return ER_NOT_HANDLED; } } - points += (int)GetDimensions(i); + p += (int)GetDimensions(i); } - for (i=0; i