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

  Switch to side-by-side view

--- a/PTcommon.c
+++ b/PTcommon.c
@@ -746,6 +746,7 @@
 
     if ((regScript = LoadScript(scriptFileName)) == 0) {
         PrintError("Could not load ScriptFile");
+        fclose(regFile);
         goto mainError;
     }
 
@@ -757,6 +758,7 @@
     // Make sure script was written completely
     if (regWritten != strlen(regScript)) {
         PrintError("Could not write temporary script");
+        fclose(regFile);
         goto mainError;
     }
     
@@ -1802,8 +1804,8 @@
     pano_cropping_parms croppingParms;
     char outputPrefix[MAX_PATH_LENGTH];
     int ptDeleteSources = 0;
-    fullPath *ptrInputFiles;
-    fullPath *ptrOutputFiles;
+    fullPath *ptrInputFiles = NULL;
+    fullPath *ptrOutputFiles = NULL;
     int base;
     int i;
   
@@ -1857,6 +1859,8 @@
     if ((ptrInputFiles = calloc(filesCount, sizeof(fullPath))) == NULL || 
         (ptrOutputFiles = calloc(filesCount, sizeof(fullPath))) == NULL)        {
         PrintError("Not enough memory");
+	      free(ptrInputFiles);
+	      free(ptrOutputFiles);
         return -1;
     }
 

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks