mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Bug #19247 Huge memleak in replication of blobs
This commit is contained in:
parent
b38221a436
commit
1a16b06ead
1 changed files with 9 additions and 2 deletions
|
@ -1911,12 +1911,16 @@ NdbEventBuffer::merge_data(const SubTableData * const sdata,
|
|||
|
||||
// loop twice where first loop only sets sizes
|
||||
int loop;
|
||||
int result = 0;
|
||||
for (loop = 0; loop <= 1; loop++)
|
||||
{
|
||||
if (loop == 1)
|
||||
{
|
||||
if (alloc_mem(data, ptr) != 0)
|
||||
DBUG_RETURN_EVENT(-1);
|
||||
{
|
||||
result = -1;
|
||||
goto end;
|
||||
}
|
||||
*data->sdata = *sdata;
|
||||
data->sdata->operation = tp->t3;
|
||||
}
|
||||
|
@ -2030,10 +2034,13 @@ NdbEventBuffer::merge_data(const SubTableData * const sdata,
|
|||
}
|
||||
}
|
||||
|
||||
end:
|
||||
// free old data
|
||||
NdbMem_Free((char*)olddata.memory);
|
||||
assert(m_total_alloc >= olddata.sz);
|
||||
m_total_alloc -= olddata.sz;
|
||||
|
||||
DBUG_RETURN_EVENT(0);
|
||||
DBUG_RETURN_EVENT(result);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue