diff options
author | Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com> | 2016-08-10 14:07:34 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-08-10 17:56:52 -0700 |
commit | 672ca65d9aa8578f382784fe73578cd499664828 (patch) | |
tree | b3b016c578ca225e824a3317ddf5e94ac6bdf5d6 /drivers/net/ethernet | |
parent | Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf (diff) | |
download | linux-dev-672ca65d9aa8578f382784fe73578cd499664828.tar.xz linux-dev-672ca65d9aa8578f382784fe73578cd499664828.zip |
tipc: fix variable dereference before NULL check
In commit cf6f7e1d5109 ("tipc: dump monitor attributes"),
I dereferenced a pointer before checking if its valid.
This is reported by static check Smatch as:
net/tipc/monitor.c:733 tipc_nl_add_monitor_peer()
warn: variable dereferenced before check 'mon' (see line 731)
In this commit, we check for a valid monitor before proceeding
with any other operation.
Fixes: cf6f7e1d5109 ("tipc: dump monitor attributes")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Parthasarathy Bhuvaragan <parthasarathy.bhuvaragan@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
0 files changed, 0 insertions, 0 deletions