Fixed mAB_release and INFINITY.
diff --git a/iccread.c b/iccread.c
index f7bc023..5968c0d 100644
--- a/iccread.c
+++ b/iccread.c
@@ -1134,9 +1134,15 @@
 
 static void mAB_release(struct lutmABType *lut)
 {
-	free(lut->a_curves);
-	free(lut->b_curves);
-	free(lut->m_curves);
+	uint8_t i;
+
+	for (i = 0; i < lut->num_in_channels; i++){
+		free(lut->a_curves[i]);
+	}
+	for (i = 0; i < lut->num_out_channels; i++){
+		free(lut->b_curves[i]);
+		free(lut->m_curves[i]);
+	}
 	free(lut);
 }
 
diff --git a/transform_util.c b/transform_util.c
index 50850c8..7ebf0a0 100644
--- a/transform_util.c
+++ b/transform_util.c
@@ -6,6 +6,7 @@
 #include "matrix.h"
 
 #define PARAMETRIC_CURVE_TYPE 0x70617261 //'para'
+#define QCMS_NEGATIVE_INFINITY (-1.f/0.f)
 
 /* value must be a value between 0 and 1 */
 //XXX: is the above a good restriction to have?
@@ -121,7 +122,7 @@
                 c = 0;
                 e = 0;
                 f = 0;
-                interval = -INFINITY;
+                interval = QCMS_NEGATIVE_INFINITY;
         } else if(count == 1) {
                 a = parameter[1];
                 b = parameter[2];