diff options
Diffstat (limited to 'arch/mips/kernel/kprobes.c')
-rw-r--r-- | arch/mips/kernel/kprobes.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/mips/kernel/kprobes.c b/arch/mips/kernel/kprobes.c index 12bc4ebdf55b..1f8187ab0997 100644 --- a/arch/mips/kernel/kprobes.c +++ b/arch/mips/kernel/kprobes.c | |||
@@ -207,7 +207,10 @@ void __kprobes arch_disarm_kprobe(struct kprobe *p) | |||
207 | 207 | ||
208 | void __kprobes arch_remove_kprobe(struct kprobe *p) | 208 | void __kprobes arch_remove_kprobe(struct kprobe *p) |
209 | { | 209 | { |
210 | free_insn_slot(p->ainsn.insn, 0); | 210 | if (p->ainsn.insn) { |
211 | free_insn_slot(p->ainsn.insn, 0); | ||
212 | p->ainsn.insn = NULL; | ||
213 | } | ||
211 | } | 214 | } |
212 | 215 | ||
213 | static void save_previous_kprobe(struct kprobe_ctlblk *kcb) | 216 | static void save_previous_kprobe(struct kprobe_ctlblk *kcb) |