mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 05:53:33 +08:00
Tone alarm sim: Fix resource leak
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
*
|
*
|
||||||
* Copyright (C) 2013 PX4 Development Team. All rights reserved.
|
* Copyright (c) 2013, 2017 PX4 Development Team. All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
* modification, are permitted provided that the following conditions
|
* modification, are permitted provided that the following conditions
|
||||||
@@ -861,6 +861,7 @@ tone_alarm_main(int argc, char *argv[])
|
|||||||
/* terminate the string */
|
/* terminate the string */
|
||||||
buffer[sz] = 0;
|
buffer[sz] = 0;
|
||||||
ret = play_string(buffer, true);
|
ret = play_string(buffer, true);
|
||||||
|
fclose(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if it looks like a PLAY string... */
|
/* if it looks like a PLAY string... */
|
||||||
|
|||||||
Reference in New Issue
Block a user