mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-01 21:48:28 -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
2b1723fd2e
commit
4851d103e1
@ -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