mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
Core/DBLayer:
- Fix memory leak introduced in previous rev - Fix linux compile, thanks to Playon for reporting --HG-- branch : trunk
This commit is contained in:
@@ -50,7 +50,7 @@ void Field::SetStructuredValue(char* newValue, enum_field_types newType, const s
|
||||
{
|
||||
size_t size = strlen(newValue);
|
||||
data.value = new char [size+1];
|
||||
strcpy(data.value, newValue);
|
||||
memcpy(data.value, newValue, size);
|
||||
data.length = size;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,6 +44,12 @@ m_rowPosition(0)
|
||||
if (!m_res)
|
||||
return;
|
||||
|
||||
if (m_stmt->bind_result_done)
|
||||
{
|
||||
delete[] m_stmt->bind->length;
|
||||
delete[] m_stmt->bind->is_null;
|
||||
}
|
||||
|
||||
m_rBind = new MYSQL_BIND[m_fieldCount];
|
||||
m_isNull = new my_bool[m_fieldCount];
|
||||
m_length = new unsigned long[m_fieldCount];
|
||||
|
||||
Reference in New Issue
Block a user