link/api: Check for null pointer in rtnl_link_af_ops_put()
This commit is contained in:
parent
3fa6a6b410
commit
280d457c22
1 changed files with 2 additions and 1 deletions
|
@ -121,7 +121,8 @@ struct rtnl_link_af_ops *rtnl_link_af_ops_lookup(const unsigned int family)
|
|||
*/
|
||||
void rtnl_link_af_ops_put(struct rtnl_link_af_ops *ops)
|
||||
{
|
||||
ops->ao_refcnt--;
|
||||
if (ops)
|
||||
ops->ao_refcnt--;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue