mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
- Fix memory leak for the JSON table type
(and continue BSON implementatio) modified: storage/connect/bson.cpp modified: storage/connect/bson.h modified: storage/connect/bsonudf.cpp modified: storage/connect/connect.cc modified: storage/connect/global.h modified: storage/connect/ha_connect.cc modified: storage/connect/jsonudf.cpp modified: storage/connect/mycat.cc modified: storage/connect/plgdbsem.h modified: storage/connect/plugutil.cpp modified: storage/connect/tabjson.cpp modified: storage/connect/tabjson.h modified: storage/connect/user_connect.cc - Desesperatly trying to fix xml.test failure modified: storage/connect/mysql-test/connect/r/xml.result
This commit is contained in:
@ -1178,7 +1178,7 @@ my_bool JsonSubSet(PGLOBAL g)
|
||||
{
|
||||
PPOOLHEADER pph = (PPOOLHEADER)g->Sarea;
|
||||
|
||||
pph->To_Free = (g->Saved_Size) ? g->Saved_Size : (size_t)sizeof(POOLHEADER);
|
||||
pph->To_Free = (g->Saved_Size) ? g->Saved_Size : sizeof(POOLHEADER);
|
||||
pph->FreeBlk = g->Sarea_Size - pph->To_Free;
|
||||
g->Saved_Size = 0;
|
||||
return FALSE;
|
||||
@ -1198,7 +1198,7 @@ inline void JsonMemSave(PGLOBAL g)
|
||||
inline void JsonFreeMem(PGLOBAL g)
|
||||
{
|
||||
g->Activityp = NULL;
|
||||
PlugExit(g);
|
||||
g = PlugExit(g);
|
||||
} /* end of JsonFreeMem */
|
||||
|
||||
/*********************************************************************************/
|
||||
@ -1281,7 +1281,7 @@ my_bool JsonInit(UDF_INIT *initid, UDF_ARGS *args, char *message, my_bool mbn,
|
||||
return true;
|
||||
} else if (g->Sarea_Size == 0) {
|
||||
strcpy(message, g->Message);
|
||||
PlugExit(g);
|
||||
g = PlugExit(g);
|
||||
return true;
|
||||
} // endif g
|
||||
|
||||
|
Reference in New Issue
Block a user