mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
AP_Scripting: prevent re-use of closed socket
this prevents a null pointer dereference after a close of a network socket
This commit is contained in:
parent
84913569cd
commit
7b36adf49d
@ -826,6 +826,7 @@ int SocketAPM_close(lua_State *L) {
|
||||
ud->close();
|
||||
delete ud;
|
||||
scripting->_net_sockets[i] = nullptr;
|
||||
*check_SocketAPM(L, 1) = nullptr;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user