50c50
< * $FreeBSD: head/sys/netatalk/aarp.c 194619 2009-06-22 10:23:54Z rwatson $
---
> * $FreeBSD: head/sys/netatalk/aarp.c 194819 2009-06-24 10:32:44Z rwatson $
144a145,147
> *
> * The _locked variant relies on the caller holding the at_ifaddr lock; the
> * unlocked variant returns a reference that the caller must dispose of.
147c150
< at_ifawithnet(struct sockaddr_at *sat)
---
> at_ifawithnet_locked(struct sockaddr_at *sat)
165a169,181
> struct at_ifaddr *
> at_ifawithnet(struct sockaddr_at *sat)
> {
> struct at_ifaddr *aa;
>
> AT_IFADDR_RLOCK();
> aa = at_ifawithnet_locked(sat);
> if (aa != NULL)
> ifa_ref(&aa->aa_ifa);
> AT_IFADDR_RUNLOCK();
> return (aa);
> }
>
204,206c220,221
< AT_IFADDR_RLOCK();
< if ((aa = at_ifawithnet(sat)) == NULL) {
< AT_IFADDR_RUNLOCK();
---
> aa = at_ifawithnet(sat);
> if (aa == NULL) {
220c235
< AT_IFADDR_RUNLOCK();
---
> ifa_free(&aa->aa_ifa);
247c262
< AT_IFADDR_RUNLOCK();
---
> ifa_free(&aa->aa_ifa);
264c279
< if ((aa = at_ifawithnet(destsat)) == NULL) {
---
> if ((aa = at_ifawithnet_locked(destsat)) == NULL) {
382,384c397,398
< AT_IFADDR_RLOCK();
< if ((aa = at_ifawithnet(&sat)) == NULL) {
< AT_IFADDR_RUNLOCK();
---
> aa = at_ifawithnet(&sat);
> if (aa == NULL) {
388,389d401
< ifa_ref(&aa->aa_ifa);
< AT_IFADDR_RUNLOCK();
< * $FreeBSD: head/sys/netatalk/aarp.c 194619 2009-06-22 10:23:54Z rwatson $
---
> * $FreeBSD: head/sys/netatalk/aarp.c 194819 2009-06-24 10:32:44Z rwatson $
144a145,147
> *
> * The _locked variant relies on the caller holding the at_ifaddr lock; the
> * unlocked variant returns a reference that the caller must dispose of.
147c150
< at_ifawithnet(struct sockaddr_at *sat)
---
> at_ifawithnet_locked(struct sockaddr_at *sat)
165a169,181
> struct at_ifaddr *
> at_ifawithnet(struct sockaddr_at *sat)
> {
> struct at_ifaddr *aa;
>
> AT_IFADDR_RLOCK();
> aa = at_ifawithnet_locked(sat);
> if (aa != NULL)
> ifa_ref(&aa->aa_ifa);
> AT_IFADDR_RUNLOCK();
> return (aa);
> }
>
204,206c220,221
< AT_IFADDR_RLOCK();
< if ((aa = at_ifawithnet(sat)) == NULL) {
< AT_IFADDR_RUNLOCK();
---
> aa = at_ifawithnet(sat);
> if (aa == NULL) {
220c235
< AT_IFADDR_RUNLOCK();
---
> ifa_free(&aa->aa_ifa);
247c262
< AT_IFADDR_RUNLOCK();
---
> ifa_free(&aa->aa_ifa);
264c279
< if ((aa = at_ifawithnet(destsat)) == NULL) {
---
> if ((aa = at_ifawithnet_locked(destsat)) == NULL) {
382,384c397,398
< AT_IFADDR_RLOCK();
< if ((aa = at_ifawithnet(&sat)) == NULL) {
< AT_IFADDR_RUNLOCK();
---
> aa = at_ifawithnet(&sat);
> if (aa == NULL) {
388,389d401
< ifa_ref(&aa->aa_ifa);
< AT_IFADDR_RUNLOCK();