diff options
Diffstat (limited to 'src/pty-unix.c')
-rw-r--r-- | src/pty-unix.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/pty-unix.c b/src/pty-unix.c index 7975964..27419ce 100644 --- a/src/pty-unix.c +++ b/src/pty-unix.c @@ -94,6 +94,8 @@ void runes_pty_backend_spawn_subprocess(RunesTerm *t) fprintf(old_stderr, "Couldn't run %s: %s\n", cmd, strerror(errno)); exit(1); } + + runes_term_refcnt_inc(t); } void runes_pty_backend_init_loop(RunesTerm *t, RunesLoop *loop) @@ -155,7 +157,10 @@ static int runes_pty_backend_got_data(void *t) return 1; } else { + runes_pty_backend_cleanup(pty); + free(pty); runes_window_backend_request_close(t); + runes_term_refcnt_dec(t); return 0; } |