X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=aoview%2Faoview_serial.c;h=29038b79af6ea747af0da5bd222ed33acb5275ea;hp=f5142ea51ad4e8a8a07aac36eca47143bcf08714;hb=5195fcfe239e430e1f9f11774c9a245c7b29dae9;hpb=1e5e98bd8f5ea0bc15592de454e3629383462371 diff --git a/aoview/aoview_serial.c b/aoview/aoview_serial.c index f5142ea5..29038b79 100644 --- a/aoview/aoview_serial.c +++ b/aoview/aoview_serial.c @@ -234,7 +234,7 @@ aoview_serial_open(const char *tty) aoview_buf_init(&serial->out_buf); serial->fd = open (tty, O_RDWR | O_NONBLOCK); if (serial->fd < 0) { - free (serial); + g_source_destroy(&serial->source); return NULL; } tcgetattr(serial->fd, &termios);