commit 48711aa87958834f3f19fe87f98ce6613f81f5ea
parent 5dd327b33d00ec510e15b0fb6788c2897f7dc6bb
Author: deurzen <m.deurzen@tum.de>
Date: Sat, 28 Nov 2020 16:04:30 +0100
adds pointer unset in case of override switch
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/backdoor.c b/src/backdoor.c
@@ -42,9 +42,11 @@ unbackdoor(void)
if (current_receive_buf2) {
while (atomic_read(&receive_buf2_count) > 0);
tty->ldisc->ops->receive_buf2 = current_receive_buf2;
+ current_receive_buf2 = NULL;
} else if (current_receive_buf) {
while (atomic_read(&receive_buf_count) > 0);
tty->ldisc->ops->receive_buf = current_receive_buf;
+ current_receive_buf = NULL;
}
tty = NULL;