Index: /branches/eam_branches/ipp-20110505/psLib/src/fits/psFitsImage.c
===================================================================
--- /branches/eam_branches/ipp-20110505/psLib/src/fits/psFitsImage.c	(revision 31607)
+++ /branches/eam_branches/ipp-20110505/psLib/src/fits/psFitsImage.c	(revision 31608)
@@ -485,6 +485,9 @@
       double boffset;
       int status;
+      status = 0;
       fits_read_key_dbl(fits->fd, "BOFFSET", &boffset, NULL, &status);
-      outImage = psFitsScaleFromDisk(outImage,boffset);
+      psImage *newImage = psFitsScaleFromDisk(outImage,boffset);
+      psFree (outImage);
+      outImage = newImage;
     }
     psFree(info);
