fix: double free bug on MacOS (thanks @drandreas)

This commit is contained in:
Chris 2018-09-09 18:03:49 +02:00
commit c4b3edef89

View file

@ -288,6 +288,7 @@ __attribute__((force_align_arg_pointer))
// when this reader thread dies, we close the serial port. // when this reader thread dies, we close the serial port.
uart_close(sp); uart_close(sp);
sp = NULL;
pthread_exit(NULL); pthread_exit(NULL);
return NULL; return NULL;