mirror of
https://github.com/MariaDB/server.git
synced 2025-02-01 03:21:53 +01:00
Fix segmentation fault on incorrect configuration.
Starting ndb_mgmd on a host which isn't in the configuration file as the ndb_mgmd (e.g. the ip address is different) would have ndb_mgmd segfault. There was a check in the code, but it was (potentially) trying to dereference null
This commit is contained in:
parent
e85c89ef90
commit
ea0949a78a
1 changed files with 3 additions and 2 deletions
|
@ -2292,8 +2292,9 @@ MgmtSrvr::alloc_node_id(NodeId * nodeId,
|
|||
if (found_matching_type)
|
||||
if (found_free_node)
|
||||
error_string.appfmt("Connection done from wrong host ip %s.",
|
||||
inet_ntoa(((struct sockaddr_in *)
|
||||
(client_addr))->sin_addr));
|
||||
(client_addr)?
|
||||
inet_ntoa(((struct sockaddr_in *)
|
||||
(client_addr))->sin_addr):"");
|
||||
else
|
||||
error_string.appfmt("No free node id found for %s.",
|
||||
type_string.c_str());
|
||||
|
|
Loading…
Add table
Reference in a new issue