Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /tiff.c [a185bc] .. [117fcb] Maximize Restore

  Switch to side-by-side view

--- a/tiff.c
+++ b/tiff.c
@@ -1222,12 +1222,14 @@
     panoTiff->tiff = TIFFOpen(fileName, "w");
     if (panoTiff->tiff == NULL) {
         PrintError("Unable to create output file [%s]", fileName);
+        free(panoTiff);
         return NULL;
     }
 
     //printf("Copy metadata from %d\n", (int) metadata->cropInfo.fullWidth);
     if (!panoMetadataCopy(&panoTiff->metadata, metadata)) {
         panoTiffClose(panoTiff);
+        free(panoTiff);
         return NULL;
     }
 
@@ -1238,6 +1240,7 @@
     //printf("Copy metadata %d\n", (int) panoTiff->metadata.cropInfo.fullWidth);
     if (!panoTiffSetImageProperties(panoTiff)) {
         panoTiffClose(panoTiff);
+        free(panoTiff);
         return NULL;
     }
     //printf("After set image properties\n");