diff options
author | Mats Kindahl <mats@sun.com> | 2009-09-25 11:47:15 +0200 |
---|---|---|
committer | Mats Kindahl <mats@sun.com> | 2009-09-25 11:47:15 +0200 |
commit | 5d2f79def9b67dd5400411070d47f8180ceb072b (patch) | |
tree | 270ae52002cbf3c0a958eed57e9f0cf4a5560791 /win/build-vs9_x64.bat | |
parent | d47710c8dccd295428fa7547720f4a5d7311c413 (diff) | |
download | mariadb-git-5d2f79def9b67dd5400411070d47f8180ceb072b.tar.gz |
Bug #47645: Segmentation fault when out of memory during handlerton initialization
There is a missing check for memory allocation failure when allocating
memory for the handlerton structure. If the handlerton init function
tries to de-reference the pointer, it will cause a segmentation fault
and crash the server.
This patch fixes the problem by not calling the init function if memory
allocation failed, and instead prints an informative error message and
reports the error to the caller.
sql/handler.cc:
Add a check if memory allocation succeeded before calling the init
function. If it failed, it is not necessary to free the memory,
but the plugin->data is set to NULL to ensure that it can be checked
for failure.
Diffstat (limited to 'win/build-vs9_x64.bat')
0 files changed, 0 insertions, 0 deletions