On Sat, Sep 06, 2025 at 05:15:59PM +0400, Fidal Palamparambil wrote: > From: Fidal palamparambil <rootuserhere@xxxxxxxxx> > > This commit addresses several issues in the kprobe event generation test module: > > 1. Fixed NULL pointer management in error paths where trace_event_file pointers > were not properly set to NULL after errors, potentially causing double-free > or use-after-free issues. > > 2. Added comprehensive cleanup for the kprobe event when kretprobe initialization > fails in kprobe_event_gen_test_init(). Previously, a failed kretprobe creation > would leave the kprobe event dangling. > > 3. Enhanced error handling consistency between kprobe and kretprobe test functions, > ensuring both follow the same pattern for resource cleanup. > > 4. Fixed the error handling flow in test_gen_kprobe_cmd() and test_gen_kretprobe_cmd() > to properly set trace_event_file pointers to NULL when errors occur after > event creation but before successful completion. > > The changes ensure proper resource management and prevent potential memory > corruption or leaks during module initialization and cleanup. > > Signed-off-by: Fidal palamparambil <rootuserhere@xxxxxxxxx> Please just stop. Luis