diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2020-12-01 19:30:56 +0100 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2020-12-01 19:39:09 +0100 |
commit | 4e8af8a6645136be34649abacb5b31ef64264584 (patch) | |
tree | 6395e9862ab27dc9879b9f68b87cc704458891d0 /storage/connect/plugutil.cpp | |
parent | 950bf6ab53d7b6d5db0e7d986b81fbd5709e98f6 (diff) | |
download | mariadb-git-4e8af8a6645136be34649abacb5b31ef64264584.tar.gz |
- 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
Diffstat (limited to 'storage/connect/plugutil.cpp')
-rw-r--r-- | storage/connect/plugutil.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/storage/connect/plugutil.cpp b/storage/connect/plugutil.cpp index 0ab594f5533..479310703eb 100644 --- a/storage/connect/plugutil.cpp +++ b/storage/connect/plugutil.cpp @@ -184,7 +184,7 @@ PGLOBAL PlugInit(LPCSTR Language, size_t worksize) /***********************************************************************/ /* PlugExit: Terminate Plug operations. */ /***********************************************************************/ -int PlugExit(PGLOBAL g) +PGLOBAL PlugExit(PGLOBAL g) { if (g) { PDBUSER dup = PlgGetUser(g); @@ -196,7 +196,7 @@ int PlugExit(PGLOBAL g) delete g; } // endif g - return 0; + return NULL; } // end of PlugExit /***********************************************************************/ @@ -483,9 +483,10 @@ bool AllocSarea(PGLOBAL g, size_t size) #else if (trace(8)) { #endif - if (g->Sarea) + if (g->Sarea) { htrc("Work area of %zd allocated at %p\n", size, g->Sarea); - else + PlugSubSet(g->Sarea, size); + } else htrc("SareaAlloc: %s\n", g->Message); } // endif trace |