summaryrefslogtreecommitdiff
path: root/aoview/aoview_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'aoview/aoview_serial.c')
-rw-r--r--aoview/aoview_serial.c2
1 files changed, 1 insertions, 1 deletions
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);