kitty: kill memory leak in self-referential animation #2012

pull/1978/head
nick black 3 years ago
parent 49729dcef9
commit 46a63c5eed
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -739,9 +739,11 @@ write_kitty_data(FILE* fp, int linesize, int leny, int lenx, int cols,
}
tam[tyx].auxvector = tmp;
}else if(level == KITTY_SELFREF){
tam[tyx].auxvector = malloc(sizeof(tam[tyx].state));
if(tam[tyx].auxvector == NULL){
goto err;
tam[tyx].auxvector = malloc(sizeof(tam[tyx].state));
if(tam[tyx].auxvector == NULL){
goto err;
}
}
memcpy(tam[tyx].auxvector, &tam[tyx].state, sizeof(tam[tyx].state));
}

@ -512,7 +512,7 @@ apply_term_heuristics(tinfo* ti, const char* termname, int fd,
if(add_smulx_escapes(ti, tablelen, tableused)){
return -1;
}
if(compare_versions(ti->termversion, "0.22.0") >= 0){
if(compare_versions(ti->termversion, "0.22.1") >= 0){
setup_kitty_bitmaps(ti, fd, KITTY_SELFREF);
}else if(compare_versions(ti->termversion, "0.20.0") >= 0){
setup_kitty_bitmaps(ti, fd, KITTY_ANIMATION);

Loading…
Cancel
Save