Changeset 1170:4a0e0a325676


Ignore:
Timestamp:
02/25/09 16:29:27 (3 years ago)
Author:
niam@…
Branch:
default
Children:
1171:36cef8b42be2, 1175:cae6ab372398
Message:

fix memleak on exception in constructor

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/dataBaseMysql.cc

    r1167 r1170  
    9292                                                        type)) 
    9393        { 
     94                delete handle; 
     95 
    9496                throw exception::basic(exception::ERRMODULE_DATABASEMYSQL, MYSQLEX_MYSQL, exception::ERRNO_MYSQL, mysql_errno(handle->handle), mysql_error(handle->handle), __LINE__, __FILE__); 
    9597        } 
  • trunk/src/dataBasePostgresql.cc

    r1167 r1170  
    142142        if (status != CONNECTION_OK) 
    143143        { 
     144                delete handle; 
     145 
    144146                throw exception::basic(exception::ERRMODULE_DATABASEPOSTGRESQL, POSTGRESQLEX_POSTGRESQL, exception::ERRNO_MYSQL, status, PQerrorMessage(handle->handle), __LINE__, __FILE__); 
    145147        } 
Note: See TracChangeset for help on using the changeset viewer.