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.
This commit is contained in:
Daniel Eklöf 2021-03-28 21:01:22 +02:00
parent a88a86f797
commit 37245fe4e6
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -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;