]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
shut up static analysis
authorAlan T. DeKok <aland@freeradius.org>
Thu, 11 Jan 2024 11:48:59 +0000 (06:48 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 11 Jan 2024 11:48:59 +0000 (06:48 -0500)
src/main/state.c

index 59a50067ff4a4d1a52150c478f0446bae925142c..c5da08caec6bde96ba794c6c6475cf432fd33ead 100644 (file)
@@ -729,13 +729,14 @@ bool fr_state_put_vps(REQUEST *request, RADIUS_PACKET *original, RADIUS_PACKET *
                VALUE_PAIR *vp, *proxy;
 
                vp = fr_pair_find_by_num(request->reply->vps, PW_STATE, 0, TAG_ANY);
+               fr_assert(vp != NULL);
+
                proxy = fr_pair_find_by_num(request->proxy_reply->vps, PW_STATE, 0, TAG_ANY);
 
                /*
                 *      We can't delete state, and we can't change it when proxying.
                 */
-               if (proxy) {
-                       fr_assert(vp != NULL);
+               if (proxy && vp) {
                        fr_assert(vp->vp_length == proxy->vp_length);
                        fr_assert(memcmp(vp->vp_octets, proxy->vp_octets, vp->vp_length) == 0);
                }