Ignore:
Timestamp:
08/25/07 16:30:26 (17 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/msql
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/msql/MSQLMagic.cc

    r8589 r8709  
    6969    const TString rc = row ? (*row)[0] : "";
    7070
     71    if (row)
     72        delete row;
     73
    7174    delete res;
    7275    return rc;
     
    124127
    125128    const Int_t rc1 = row && (*row)[0] ? atoi((*row)[0]) : -1;
     129
     130    if (row)
     131        delete row;
     132
    126133    delete res1;
     134
    127135    return rc1;
    128136}
     
    191199    if (row && (*row)[0])
    192200        rc=kTRUE;
     201
     202    if (row)
     203        delete row;
    193204
    194205    delete res;
  • trunk/MagicSoft/Mars/msql/MSQLServer.cc

    r8185 r8709  
    11/* ======================================================================== *\
    2 ! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.13 2006-11-01 08:29:45 tbretz Exp $
     2! $Name: not supported by cvs2svn $:$Id: MSQLServer.cc,v 1.14 2007-08-25 15:30:26 tbretz Exp $
    33! --------------------------------------------------------------------------
    44!
     
    8282
    8383    TSQLRow *row=res->Next();
    84     const TString desc((*row)[1]);
     84    const TString desc(row ? (*row)[1] : "");
     85
     86    if (row)
     87        delete row;
    8588
    8689    delete res;
     
    178181    {
    179182        TString row0((*row)[0]);
     183        delete row;
    180184
    181185        MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s/%s", (const char*)fDataBase, (const char*)fTable, (const char*)row0));
     
    202206    {
    203207        TString row0((*row)[0]);
     208        delete row;
    204209
    205210        MSQLServer *sql = (MSQLServer*)fList.FindObject(Form("%s/%s", (const char*)fDataBase, (const char*)row0));
     
    226231    {
    227232        const TString row0((*row)[0]);
     233        delete row;
    228234
    229235        MSQLServer *sql = (MSQLServer*)fList.FindObject(row0);
     
    257263
    258264    TList rows;
     265    rows.SetOwner();
     266
    259267    while ((row=res.Next()))
    260268    {
     
    305313
    306314    TList rows;
     315    rows.SetOwner();
     316
    307317    while ((row=res->Next()))
    308318        rows.Add(row);
     
    767777    while ((row=res->Next()))
    768778    {
    769         TString key = (*row)[3];
    770         if (key!="PRI")
    771             continue;
    772 
    773         rc = (*row)[0];
    774         break;
     779        const TString key = (*row)[3];
     780        if (key=="PRI")
     781        {
     782            rc = (*row)[0];
     783            break;
     784        }
     785        delete row;
    775786    }
    776787
Note: See TracChangeset for help on using the changeset viewer.