]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Remove duplicate setting of attr
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 10 Aug 2017 13:28:24 +0000 (15:28 +0200)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 10 Aug 2017 13:28:24 +0000 (15:28 +0200)
Check there’s a reply packet?

src/modules/rlm_radius/rlm_radius_udp.c

index dfa85322d3dc31ac9a501b3b5fe0cc0747d88b61..cbd8af5770d744254115d749ead3a676439a6451 100644 (file)
@@ -559,7 +559,6 @@ redo:
        if (code == FR_CODE_PROTOCOL_ERROR) {
                uint8_t const *attr, *end;
 
-               attr = c->buffer + 20;
                end = c->buffer + packet_len;
                link->rcode = RLM_MODULE_INVALID;
 
@@ -677,7 +676,7 @@ redo:
                 *      Access-Accept" policies...  so the user could
                 *      programatically decide which attributes to add.
                 */
-               
+
                fr_pair_add(&request->reply->vps, vp);
        }
 
@@ -691,7 +690,7 @@ done:
                 *      Delete the reply, but leave the request VPs in
                 *      place.
                 */
-               fr_pair_list_free(&request->reply->vps);
+               if (request->reply) fr_pair_list_free(&request->reply->vps);
 
        } else {
                /*