Fix memory leak in text_layout_raqm on 0 length string

This commit is contained in:
Eric Soroos 2025-05-16 12:47:22 +02:00
parent 6391f2c207
commit ff50e30d3e

View File

@ -275,6 +275,7 @@ text_layout_raqm(
if (!text || !size) {
/* return 0 and clean up, no glyphs==no size,
and raqm fails with empty strings */
PyMem_Free(text);
goto failed;
}
set_text = raqm_set_text(rq, text, size);