From: Mathieu Desnoyers Date: Wed, 20 Mar 2013 18:02:38 +0000 (-0400) Subject: tracepoint: Don't add NULL probes X-Git-Tag: v2.1.2~2 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a26745c59463e8a95945294552c6ac3aab5696c7;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) {