]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Check vb is allocated (CID #1532274)
authorNick Porter <nick@portercomputing.co.uk>
Tue, 6 Jun 2023 07:24:40 +0000 (08:24 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 6 Jun 2023 07:24:40 +0000 (08:24 +0100)
src/lib/util/value.h

index 32374a530619062cba8fff40999a58f90426fd6d..5afcab20675d73f5492a5ded21b1dbf650010309 100644 (file)
@@ -556,6 +556,7 @@ static inline CC_HINT(nonnull(2))
 fr_value_box_t *fr_value_box_acopy(TALLOC_CTX *ctx, fr_value_box_t const *src)
 {
        fr_value_box_t *vb = fr_value_box_alloc_null(ctx);
+       if (unlikely(!vb)) return NULL;
 
        if ((unlikely(fr_value_box_copy(vb, vb, src) < 0))) {
                talloc_free(vb);