From: Mathieu Desnoyers Date: Fri, 21 Feb 2014 18:16:20 +0000 (-0500) Subject: Fix: add assert for NULL dereference X-Git-Tag: v2.3.2~3 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=95d6edb60161c2fa4d714caa6f8359bf310d6d32;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 a852aaef..81605a1a 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++; }