[FIX] NULL pointer dereference 45/72045/1
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 25 May 2016 19:35:59 +0000 (22:35 +0300)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 30 May 2016 09:43:52 +0000 (12:43 +0300)
Change-Id: I679432eb9ecfbef7c2368ca9420f09c54c52ebcd
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
kprobe/swap_kprobes.c

index 2a2bce6..bd26f8a 100644 (file)
@@ -382,7 +382,7 @@ static int pre_handler_one(struct kp_core *core, struct pt_regs *regs)
        int ret = 0;
        struct kprobe *p = core->handlers.kps[0];
 
-       if (p->pre_handler)
+       if (p && p->pre_handler)
                ret = p->pre_handler(p, regs);
 
        return ret;