rtnl_link_af_unregister() attempts to write-lock info_lock twice
instead of releasing it before returning. It also will return with
info_lock write-locked if passed a NULL ops.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
int err = -NLE_INVAL;
if (!ops)
- goto errout;
+ return err;
nl_write_lock(&info_lock);
if (!af_ops[ops->ao_family]) {
ops->ao_family);
errout:
- nl_write_lock(&info_lock);
+ nl_write_unlock(&info_lock);
return err;
}