mirror of
https://github.com/opnsense/src.git
synced 2026-06-13 10:40:19 -04:00
in6_mc_get: Fix recursion on if_addr_lock on malloc failure
Analogously to r291040, in6_mc_get recurses on if_addr_lock if the M_NOWAIT allocation fails. The fix is the same. Suggested by: Andrey V. Elsukov Reviewed by: jhb (ip4 version) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D4138 (ip4 version)
This commit is contained in:
parent
749f65e3e3
commit
55faae77fa
1 changed files with 2 additions and 2 deletions
|
|
@ -469,9 +469,9 @@ in6_mc_get(struct ifnet *ifp, const struct in6_addr *group,
|
|||
*/
|
||||
inm = malloc(sizeof(*inm), M_IP6MADDR, M_NOWAIT | M_ZERO);
|
||||
if (inm == NULL) {
|
||||
IF_ADDR_WUNLOCK(ifp);
|
||||
if_delmulti_ifma(ifma);
|
||||
error = ENOMEM;
|
||||
goto out_locked;
|
||||
return (ENOMEM);
|
||||
}
|
||||
inm->in6m_addr = *group;
|
||||
inm->in6m_ifp = ifp;
|
||||
|
|
|
|||
Loading…
Reference in a new issue