mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Sensors: Fix corner case on FD leak (not a real leak)
This commit is contained in:
parent
a9c8f2331b
commit
9a40fe4ede
@ -1,6 +1,6 @@
|
||||
/****************************************************************************
|
||||
*
|
||||
* Copyright (c) 2012-2014 PX4 Development Team. All rights reserved.
|
||||
* Copyright (c) 2012-2015 PX4 Development Team. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@ -1465,7 +1465,7 @@ Sensors::parameter_update_poll(bool forced)
|
||||
|
||||
/* this sensor is optional, abort without error */
|
||||
|
||||
if (fd > 0) {
|
||||
if (fd >= 0) {
|
||||
struct airspeed_scale airscale = {
|
||||
_parameters.diff_pres_offset_pa,
|
||||
1.0f,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user