mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 04:04:07 +08:00
fix resource leak in mavlink_main.cpp: close the socket
This commit is contained in:
parent
d8fbd8a6f6
commit
1f55e23827
@ -2249,6 +2249,11 @@ Mavlink::task_main(int argc, char *argv[])
|
||||
::close(_uart_fd);
|
||||
}
|
||||
|
||||
if (_socket_fd >= 0) {
|
||||
close(_socket_fd);
|
||||
_socket_fd = -1;
|
||||
}
|
||||
|
||||
if (_forwarding_on || _ftp_on) {
|
||||
message_buffer_destroy();
|
||||
pthread_mutex_destroy(&_message_buffer_mutex);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user