link/api: Check for null pointer in rtnl_link_af_ops_put()

This commit is contained in:
Thomas Graf 2010-11-11 16:02:02 +01:00
parent 3fa6a6b410
commit 280d457c22

View file

@ -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--;
}
/**