Fix: add assert for NULL dereference
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Feb 2014 18:16:20 +0000 (13:16 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 21 Feb 2014 18:16:49 +0000 (13:16 -0500)
CID 1021248 (#1 of 1): Dereference null return value (NULL_RETURNS)3.
dereference: Dereferencing a null pointer "obj".

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-ust-abi.c

index 61245a88dfcc2cd18b2163e8016b199e6a26d2d5..7e513a98d09393c4d379e791406d3c151ee1df10 100644 (file)
@@ -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++;
 }
 
This page took 0.0247 seconds and 4 git commands to generate.