From: Mathieu Desnoyers Date: Wed, 20 Mar 2013 18:02:38 +0000 (-0400) Subject: tracepoint: Don't add NULL probes X-Git-Tag: v2.2.0-rc1~49 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=d75091471255c7f510b0ca9429703d50ac5205e2;p=lttng-ust.git tracepoint: Don't add NULL probes Reported-by: Sahara Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index 7de56ca0..d7293dab 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -143,8 +143,10 @@ tracepoint_entry_add_probe(struct tracepoint_entry *entry, int nr_probes = 0; struct tracepoint_probe *old, *new; - WARN_ON(!probe); - + if (!probe) { + WARN_ON(1); + return ERR_PTR(-EINVAL); + } debug_print_probes(entry); old = entry->probes; if (old) {