]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - MUON/AliMUONLocalTriggerBoard.cxx
From Redmer:
[u/mrichter/AliRoot.git] / MUON / AliMUONLocalTriggerBoard.cxx
index 423789bac5e70840f1ea751290c7698856df426b..25fc4be82cf0a5e7edf09fb329eab98440ec3a17 100644 (file)
@@ -33,6 +33,8 @@
 #include <TBits.h>
 #include <Riostream.h>
 
+using std::endl;
+using std::cout;
 /// \cond CLASSIMP
 ClassImp(AliMUONLocalTriggerBoard)
 /// \endcond
@@ -1177,6 +1179,9 @@ Int_t AliMUONLocalTriggerBoard::GetI() const
 
    const Int_t kMaxfields = 2; char **fields = new char*[kMaxfields];
 
+   for (Int_t i = 0; i < kMaxfields; i++) 
+     fields[i] = new char[1];
+
    char s[100]; strncpy(s, GetName(), 99);
 
    Int_t numlines = 0;
@@ -1185,6 +1190,7 @@ Int_t AliMUONLocalTriggerBoard::GetI() const
         token != NULL;
         token = strtok(NULL, " "))
    {
+      delete [] fields[numlines];
       fields[numlines] = new char[strlen(token)+1];
       strcpy(fields[numlines++], token);
    }