From: Mathieu Desnoyers Date: Fri, 21 Feb 2014 18:16:20 +0000 (-0500) Subject: Fix: add assert for NULL dereference X-Git-Tag: v2.4.0~12 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=072886c488d5edca678b10ed827bc8960323cc99;p=lttng-ust.git Fix: add assert for NULL dereference CID 1021248 (#1 of 1): Dereference null return value (NULL_RETURNS)3. dereference: Dereferencing a null pointer "obj". Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 61245a88..7e513a98 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -185,6 +185,7 @@ static void objd_ref(int id) { struct lttng_ust_obj *obj = _objd_get(id); + assert(obj != NULL); obj->u.s.f_count++; }