From: Nick Porter Date: Tue, 6 Jun 2023 07:24:40 +0000 (+0100) Subject: Check vb is allocated (CID #1532274) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a243a6f2402a0ff19d0ee2b091147a4e613b41f;p=thirdparty%2Ffreeradius-server.git Check vb is allocated (CID #1532274) --- diff --git a/src/lib/util/value.h b/src/lib/util/value.h index 32374a53061..5afcab20675 100644 --- a/src/lib/util/value.h +++ b/src/lib/util/value.h @@ -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);