harfbuzz / harfbuzz_rs

A fully safe Rust wrapper for the harfbuzz text shaping library.
MIT License
54 stars 23 forks source link

Fix Memory Leak on Font Creation #22

Closed kbleeke closed 4 years ago

kbleeke commented 4 years ago

hb_font_create internally references the face. Therefore it is incorrect to call Shared::into_raw on the argument.

see https://github.com/servo/rust-harfbuzz/blob/master/harfbuzz-sys/harfbuzz/src/hb-font.cc#L1354

Basically the same as ef01207dcf3e7ae4b6f63fb018fe95b716f993db cc #19

manuel-rhdt commented 4 years ago

Thank you!