]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Correct building of extents so that the last found parent is always returned
authorNick Porter <nick@portercomputing.co.uk>
Tue, 2 Aug 2022 15:16:51 +0000 (16:16 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 11 Aug 2022 16:28:24 +0000 (17:28 +0100)
src/lib/server/tmpl_dcursor.c

index c950316548359c64c1bc8da9083302c496d1ad7a..d9deea7df40edfe091464f4031b36e69f82f528c 100644 (file)
@@ -598,14 +598,9 @@ int tmpl_extents_find(TALLOC_CTX *ctx,
                 *      If the reference was structural, record this
                 *      as an extent.
                 */
-               if (existing) switch (ar->da->type) {
-               case FR_TYPE_STRUCTURAL:
-                       EXTENT_ADD(existing, NULL, curr, list_head);
-                       break;
+               if (existing) EXTENT_ADD(existing, NULL, list_ctx, list_head);
 
-               default:
-                       break;
-               }
+               break;
        }
 
        return 0;