diff --git a/src/libvterm/src/vterm.c b/src/libvterm/src/vterm.c index 7b06c04bbc..991286ee90 100644 --- a/src/libvterm/src/vterm.c +++ b/src/libvterm/src/vterm.c @@ -79,6 +79,13 @@ VTerm *vterm_new_with_allocator(int rows, int cols, VTermAllocatorFunctions *fun vt->tmpbuffer_len = 64; vt->tmpbuffer = vterm_allocator_malloc(vt, vt->tmpbuffer_len); + if (vt->tmpbuffer == NULL) + { + vterm_allocator_free(vt, vt->parser.strbuffer); + vterm_allocator_free(vt, vt); + vterm_allocator_free(vt, vt->outbuffer); + return NULL; + } return vt; } @@ -93,6 +100,7 @@ void vterm_free(VTerm *vt) vterm_allocator_free(vt, vt->parser.strbuffer); vterm_allocator_free(vt, vt->outbuffer); + vterm_allocator_free(vt, vt->tmpbuffer); vterm_allocator_free(vt, vt); } diff --git a/src/version.c b/src/version.c index abdb68a732..4dcae55f02 100644 --- a/src/version.c +++ b/src/version.c @@ -746,6 +746,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 788, /**/ 787, /**/