iolog: fix reported defect from coverity scan
authorAnkit Kumar <ankit.kumar@samsung.com>
Thu, 25 Jan 2024 23:33:28 +0000 (05:03 +0530)
committerAnkit Kumar <ankit.kumar@samsung.com>
Fri, 26 Jan 2024 01:22:50 +0000 (06:52 +0530)
commitacc481b6d34aab3ee6e19f22b64f8bf0dd30480c
treeac15efa141b9ded2b4b2dd45ce2490331e836b2b
parent4502ad2c5b18085a2f4f5a71741ef0ca24cdaf38
iolog: fix reported defect from coverity scan

Fix the two Null pointer dereferences issue reported by Coverity scan

Null pointer dereferences  (FORWARD_NULL)
Dereferencing null pointer "l->td"

Null pointer dereferences  (REVERSE_INULL)
Null-checking "p->td" suggests that it may be null, but it has already
been dereferenced on all paths leading to the check.

For aggregate read, write and trim bandwidth log, the setup_log function
gets called with NULL pointer reference for thread data. Thus before
dereferencing further we should check "l->td".

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
iolog.c