Skip to content

Commit

Permalink
Module: always ref on construct
Browse files Browse the repository at this point in the history
  • Loading branch information
s1341 committed Jan 15, 2025
1 parent 588381c commit 8586544
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 3 additions & 0 deletions frida-gum/src/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ pub struct Module {

impl Module {
pub(crate) fn from_raw(module: *mut GumModule) -> Self {
unsafe {
gum_sys::g_object_ref(module.cast());
}
Self { inner: module }
}
/// Load a module by name
Expand Down
1 change: 0 additions & 1 deletion frida-gum/src/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ impl<'a> Process<'a> {
user_data: gpointer,
) -> gboolean {
let res = &mut *(user_data as *mut CallbackData);
gum_sys::g_object_ref(details.cast());
res.modules.push(Module::from_raw(details));

1
Expand Down

0 comments on commit 8586544

Please sign in to comment.