mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-01 18:33:05 +03:00
Fix memory leak in text_layout_raqm on 0 length string
This commit is contained in:
parent
6391f2c207
commit
ff50e30d3e
|
@ -275,6 +275,7 @@ text_layout_raqm(
|
||||||
if (!text || !size) {
|
if (!text || !size) {
|
||||||
/* return 0 and clean up, no glyphs==no size,
|
/* return 0 and clean up, no glyphs==no size,
|
||||||
and raqm fails with empty strings */
|
and raqm fails with empty strings */
|
||||||
|
PyMem_Free(text);
|
||||||
goto failed;
|
goto failed;
|
||||||
}
|
}
|
||||||
set_text = raqm_set_text(rq, text, size);
|
set_text = raqm_set_text(rq, text, size);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user