]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Pacify clang scan
authorNick Porter <nick@portercomputing.co.uk>
Mon, 16 Feb 2026 11:05:26 +0000 (11:05 +0000)
committerNick Porter <nick@portercomputing.co.uk>
Mon, 16 Feb 2026 11:28:36 +0000 (11:28 +0000)
src/lib/unlang/compile.c

index 10074a10a34756a598992492d4c70a838c997316..0446bada51a8fd085951226cb72012e02ae87dff 100644 (file)
@@ -383,7 +383,7 @@ int unlang_fixup_update(map_t *map, void *ctx)
                 *      What exactly where you expecting to happen here?
                 */
                if (tmpl_attr_tail_da_is_leaf(map->lhs) &&
-                   tmpl_is_list(map->rhs)) {
+                   map->rhs && tmpl_is_list(map->rhs)) {
                        cf_log_err(map->ci, "Can't copy list into an attribute");
                        return -1;
                }
@@ -406,6 +406,11 @@ int unlang_fixup_update(map_t *map, void *ctx)
         */
        if (map->op == T_OP_CMP_FALSE) return 0;
 
+       if (unlikely(!map->rhs)) {
+               cf_log_err(map->ci, "Missing rhs");
+               return -1;
+       }
+
        if (!tmpl_is_data_unresolved(map->rhs)) return 0;
 
        /*