Skip to content
This repository was archived by the owner on Jun 8, 2021. It is now read-only.

Commit 691941a

Browse files
authored
Merge pull request #590 from sdroege/new-quark-leak
Don't pass an owned string to g_quark_from_static_string()
2 parents 67caba9 + a1c83c6 commit 691941a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/quark.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pub struct Quark(glib_sys::GQuark);
1313

1414
impl Quark {
1515
pub fn from_string(s: &str) -> Quark {
16-
unsafe { from_glib(glib_sys::g_quark_from_static_string(s.to_glib_full())) }
16+
unsafe { from_glib(glib_sys::g_quark_from_string(s.to_glib_none().0)) }
1717
}
1818

1919
#[allow(clippy::trivially_copy_pass_by_ref)]

0 commit comments

Comments
 (0)