Bug #26825 MySQL Server Crashes in high load

  - initialize to NULL, to avoid call of free on uninitialized variable
parent ba74604c
...@@ -6063,7 +6063,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, ...@@ -6063,7 +6063,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db,
int error= 0; int error= 0;
NdbError ndb_error; NdbError ndb_error;
uint len; uint len;
const void* data; const void* data= NULL;
Ndb* ndb; Ndb* ndb;
char key[FN_REFLEN]; char key[FN_REFLEN];
DBUG_ENTER("ndbcluster_discover"); DBUG_ENTER("ndbcluster_discover");
...@@ -6131,6 +6131,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, ...@@ -6131,6 +6131,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db,
DBUG_RETURN(0); DBUG_RETURN(0);
err: err:
my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR));
if (share) if (share)
free_share(&share); free_share(&share);
if (ndb_error.code) if (ndb_error.code)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment