aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2021-03-28 19:01:22 +0000
committerDaniel Eklöf <daniel@ekloef.se>2021-03-28 19:01:22 +0000
commit37245fe4e65b307b6ab6fe16dfa8f9370c7e6abe (patch)
treee1111138da0679710cde390798a404f74631efdb
parentinstall: add ‘ninja test’ to all build types (diff)
term: free vt.osc8.uri when destroying a terminal
Free vt.osc8.uri in term_destroy(), in the off chance, that the client application emitted an un-terminated OSC-8 URI.
-rw-r--r--terminal.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/terminal.c b/terminal.c
index 1984562f..47c0e1ff 100644
--- a/terminal.c
+++ b/terminal.c
@@ -1430,6 +1430,7 @@ term_destroy(struct terminal *term)
mtx_unlock(&term->render.workers.lock);
free(term->vt.osc.data);
+ free(term->vt.osc8.uri);
grid_free(&term->normal);
grid_free(&term->alt);
@@ -1679,6 +1680,7 @@ term_reset(struct terminal *term, bool hard)
free(term->vt.osc.data);
memset(&term->vt, 0, sizeof(term->vt));
term->vt.state = 0; /* GROUND */
+
term->vt.osc8.begin = (struct coord){-1, -1};
free(term->vt.osc8.uri);
term->vt.osc8.uri = NULL;