netfilter: xt_HARDIDLETIMER: Fix null de-reference
added a null check to prevent a null pointer derefence of hard idle timer Change-Id: Id1e49d5b109d8c71947723b252f4d2b6f3ebc35f CRs-Fixed: 880124 Signed-off-by: Susheel Yadav Yadagiri <syadagir@codeaurora.org>
This commit is contained in:
parent
2a38010e6c
commit
4d90c4302a
1 changed files with 1 additions and 1 deletions
|
@ -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) && (timer->send_nl_msg))
|
||||
return snprintf(buf, PAGE_SIZE, "0 %ld\n", ktimespec.tv_sec);
|
||||
else
|
||||
return snprintf(buf, PAGE_SIZE, "0\n");
|
||||
|
|
Loading…
Add table
Reference in a new issue