Ticket #2120: gdal_memoryleak.diff

File gdal_memoryleak.diff, 1.4 kB (added by mloskot, 5 months ago)

Diff file from Linda

  • ogr/ogrsf_frmts/oci/ogrocidatasource.cpp

    old new  
    211211    { 
    212212        OpenTable( papszTableList[i], -1, bUpdate, FALSE ); 
    213213    } 
    214  
     214        CSLDestroy(papszTableList); 
    215215    return TRUE; 
    216216} 
    217217 
  • ogr/ogrsf_frmts/oci/ogrocisession.cpp

    old new  
    6969    hDescribe = NULL; 
    7070    hGeometryTDO = NULL; 
    7171    hOrdinatesTDO = NULL; 
     72        pszUserid = NULL; 
     73    pszPassword = NULL; 
     74    pszDatabase = NULL; 
    7275} 
    7376 
    7477/************************************************************************/ 
     
    7679/************************************************************************/ 
    7780 
    7881OGROCISession::~OGROCISession() 
    79  
    8082{ 
    8183    if( hDescribe != NULL ) 
    8284        OCIHandleFree((dvoid *)hDescribe, (ub4)OCI_HTYPE_DESCRIBE); 
    8385 
    8486    if( hSvcCtx != NULL ) 
    8587        OCILogoff( hSvcCtx, hError ); 
     88        if (pszUserid != NULL) 
     89            CPLFree( pszUserid ); 
     90        if (pszPassword != NULL) 
     91                CPLFree( pszPassword ); 
     92    if (pszDatabase != NULL) 
     93                CPLFree( pszDatabase ); 
     94 
    8695} 
    8796 
    8897/************************************************************************/