Coverity fix.
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 11:32:05 +0000 (11:32 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 1 Feb 2011 11:32:05 +0000 (11:32 +0000)
MONITOR/root2date.cxx

index d76df96..a698e92 100644 (file)
@@ -55,8 +55,8 @@ int Root2Date(AliRawVEvent *gdcRootEvent, unsigned char *gdcDateEvent, char *ddl
      FILE *ddlFile;
      if((ddlFile=fopen(ddlFileName, "wb"))) {
        fwrite(p, chunkSize, 1, ddlFile);
+       fclose(ddlFile);
      }
-     fclose(ddlFile);
    }
    p+=chunkSize;
   }