]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
check for memory allocation failures
authorAlan T. DeKok <aland@freeradius.org>
Wed, 6 Nov 2019 17:22:14 +0000 (12:22 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 6 Nov 2019 21:56:45 +0000 (16:56 -0500)
src/lib/server/cf_parse.c

index dfed273a33dcd3db4acf60116966a5d7971fce1a..f353d567178584fa38705a2c8d95dfb324ad8a17 100644 (file)
@@ -683,6 +683,8 @@ static int CC_HINT(nonnull(4,5)) cf_pair_parse_internal(TALLOC_CTX *ctx, void *o
                        return -1;      /* Unsupported type */
                }
 
+               if (!array) return -1;
+
                for (i = 0; i < count; i++, cp = cf_pair_find_next(cs, cp, rule->name)) {
                        int             ret;
                        cf_parse_t      func;