Skip to content

Commit f792e0b

Browse files
committed
Fix memory leak
* Return after setting the error for advanced features without libraqm. Not returning here leads to an alloc that's never freed.
1 parent e2e40c5 commit f792e0b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/_imagingft.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,7 @@ text_layout_fallback(
425425
"setting text direction, language or font features is not supported "
426426
"without libraqm"
427427
);
428+
return 0;
428429
}
429430

430431
if (PyUnicode_Check(string)) {

0 commit comments

Comments
 (0)