From: Alan T. DeKok Date: Wed, 23 Oct 2019 19:44:03 +0000 (-0400) Subject: free unknown parents if necessary X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dbc825f22d5e9516c0b2ef69fbe096e9e460e362;p=thirdparty%2Ffreeradius-server.git free unknown parents if necessary --- diff --git a/src/protocols/radius/decode.c b/src/protocols/radius/decode.c index 0bde13fa40c..b2c271722fe 100644 --- a/src/protocols/radius/decode.c +++ b/src/protocols/radius/decode.c @@ -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) {