diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2024-07-13 14:28:28 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2024-07-13 14:28:28 +0000 |
commit | a873ce0ac2c469debc5ecef589ba33a9b2d62376 (patch) | |
tree | d7a6e14ead42e152122ad19625cca30d63167ab1 /sbin | |
parent | 8b373c93f0b1ae3d328b6aeab6ae0b270f36f5ff (diff) |
NULL check must be inside the loop. found tobhe
ok tobhe
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/iked/radius.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/iked/radius.c b/sbin/iked/radius.c index 8cd4a5310e1..ab2e6fb1ed6 100644 --- a/sbin/iked/radius.c +++ b/sbin/iked/radius.c @@ -1,4 +1,4 @@ -/* $OpenBSD: radius.c,v 1.6 2024/07/13 14:19:09 yasuoka Exp $ */ +/* $OpenBSD: radius.c,v 1.7 2024/07/13 14:28:27 yasuoka Exp $ */ /* * Copyright (c) 2024 Internet Initiative Japan Inc. @@ -892,9 +892,9 @@ iked_radius_dae_on_event(int fd, short ev, void *ctx) } } else if (radius_get_uint32_attr(req, RADIUS_TYPE_FRAMED_IP_ADDRESS, &u32) == 0) { - addr4 = sa->sa_addrpool; - if (addr4 != NULL) { - RB_FOREACH(sa, iked_sas, &env->sc_sas) { + RB_FOREACH(sa, iked_sas, &env->sc_sas) { + addr4 = sa->sa_addrpool; + if (addr4 != NULL) { if (u32 == ((struct sockaddr_in *)&addr4->addr) ->sin_addr.s_addr) { ikev2_ike_sa_setreason(sa, reason); |