Skip to content

Commit 8586544

Browse files
committed
Module: always ref on construct
1 parent 588381c commit 8586544

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

frida-gum/src/module.rs

+3
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ pub struct Module {
9393

9494
impl Module {
9595
pub(crate) fn from_raw(module: *mut GumModule) -> Self {
96+
unsafe {
97+
gum_sys::g_object_ref(module.cast());
98+
}
9699
Self { inner: module }
97100
}
98101
/// Load a module by name

frida-gum/src/process.rs

-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ impl<'a> Process<'a> {
207207
user_data: gpointer,
208208
) -> gboolean {
209209
let res = &mut *(user_data as *mut CallbackData);
210-
gum_sys::g_object_ref(details.cast());
211210
res.modules.push(Module::from_raw(details));
212211

213212
1

0 commit comments

Comments
 (0)