ts2phc: Use proper close method on the error path.
When creating a ts2phc slave, a clock is obtained by invoking the posix_clock_open() method. However, in case of an error, the same clock is closed again by calling close(2) on the associated file descriptor directly. While not incorrect, still the code should instead use the close function that matches the open method. Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
61c6a70898
commit
278d9f45ab
|
@ -223,7 +223,7 @@ no_ext_ts:
|
||||||
no_pin_func:
|
no_pin_func:
|
||||||
servo_destroy(slave->servo);
|
servo_destroy(slave->servo);
|
||||||
no_servo:
|
no_servo:
|
||||||
close(slave->fd);
|
posix_clock_close(slave->clk);
|
||||||
no_posix_clock:
|
no_posix_clock:
|
||||||
free(slave->name);
|
free(slave->name);
|
||||||
free(slave);
|
free(slave);
|
||||||
|
|
Loading…
Reference in New Issue