--- chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2012/05/15 14:04:40 1.33 +++ chewbacca/YodaProfiler/src/PamelaDBOperations.cpp 2013/04/10 08:54:28 1.35 @@ -5449,7 +5449,8 @@ if ( IsDebug() ) cout << endl << ">>>> TRY TO RECOVER TRACKER CALIBRATIONS <<<<"<Query(oss.str().c_str()); + rresult = conn->Query(oss.str().c_str()); if ( !result ) throw -4;; if ( IsDebug() ) cout <<"Rows: "<GetRowCount()<Next(); + row = rresult->Next(); if(!row)break; UInt_t id = (UInt_t)atoll(row->GetField(0)); @@ -5668,7 +5669,8 @@ if(FOUND)break; }while(1);//endl loop over root table entries - + + delete result2; // 10RED potential memory leak if(FOUND)break; }//end loop over tables @@ -5822,7 +5824,7 @@ }while(1);//end loop over calibrations - if( result )delete result; + if( rresult )delete rresult; // 10RED bug if( row )delete row; @@ -6123,7 +6125,7 @@ memset(myid,0,500*sizeof(UInt_t)); // oss.str(""); - oss << "SELECT ID,RUNTRAILER_TIME,RUNTRAILER_PKT,BOOT_NUMBER FROM GL_RUN_FRAGMENTS WHERE INSERT_TIME <= '" << clean_time->AsSQLString() << "'order BY RUNHEADER_TIME asc;"; + oss << "SELECT ID,RUNTRAILER_TIME,RUNTRAILER_PKT,BOOT_NUMBER FROM GL_RUN_FRAGMENTS WHERE INSERT_TIME <= '" << clean_time->AsSQLString() << "' order BY RUNHEADER_TIME asc;"; if ( IsDebug() ) printf(" Select from GL_RUN_FRAGMENTS runs older than %s : query is \n %s \n",clean_time->AsSQLString(),oss.str().c_str()); nresult = conn->Query(oss.str().c_str()); //