netfilter: xt_HARDIDLETIMER: Add null check
Add NULL pointer check Change-Id: I6d915e818568be861cef8f5ea1b04c2897e09cc9 Signed-off-by: Bhavya Sokke Mallikarjunappa <bsokke@codeaurora.org>
This commit is contained in:
parent
c3e072e1ac
commit
2e30d54163
|
@ -134,7 +134,7 @@ static ssize_t hardidletimer_tg_show(struct kobject *kobj,
|
|||
if (ktimespec.tv_sec >= 0)
|
||||
return snprintf(buf, PAGE_SIZE, "%ld\n", ktimespec.tv_sec);
|
||||
|
||||
if (timer->send_nl_msg)
|
||||
if (timer != NULL && timer->send_nl_msg)
|
||||
return snprintf(buf, PAGE_SIZE, "0 %ld\n", ktimespec.tv_sec);
|
||||
else
|
||||
return snprintf(buf, PAGE_SIZE, "0\n");
|
||||
|
|
Loading…
Reference in New Issue