[tipc-discussion] [PATCH net v1 1/1] tipc: fix variable dereference before NULL check

2016-08-10 Thread Parthasarathy Bhuvaragan
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

Re: [tipc-discussion] [PATCH net v1 1/1] tipc: fix variable dereference before NULL check

2016-08-10 Thread David Miller
From: Parthasarathy Bhuvaragan Date: Wed, 10 Aug 2016 14:07:34 +0200 > 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: