]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
free unknown parents if necessary
authorAlan T. DeKok <aland@freeradius.org>
Wed, 23 Oct 2019 19:44:03 +0000 (15:44 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 23 Oct 2019 19:44:03 +0000 (15:44 -0400)
src/protocols/radius/decode.c

index 0bde13fa40c848913eba2c2fa5231aa0331f127b..b2c271722fef0a5c15ca45b0066948cc7f21bb43 100644 (file)
@@ -1386,7 +1386,10 @@ ssize_t fr_radius_decode_pair_value(TALLOC_CTX *ctx, fr_cursor_t *cursor, fr_dic
         *      information, decode the actual p.
         */
        vp = fr_pair_afrom_da(ctx, parent);
-       if (!vp) return -1;
+       if (!vp) {
+               if (parent->flags.is_unknown) fr_dict_unknown_free(&parent);
+               return -1;
+       }
        vp->tag = tag;
 
        switch (parent->type) {