In case talloc_zero returns NULL, we must return NULL from
function check_ctx_create(). Otherwise, we dereference NULL
pointer when accessing fields of ctx struct.
Suggested-by: Anoop C S <anoopcs@samba.org>
Signed-off-by: Daniil Sarafannikov <sarafannikovda@sgu.ru>
Reviewed-by: Anoop C S <anoopcs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Tue Jun 30 13:39:52 UTC 2026 on atb-devel-224
const struct check_options *opt)
{
struct check_ctx *ctx = talloc_zero(mem_ctx, struct check_ctx);
+ if (ctx == NULL) {
+ return NULL;
+ }
ctx->opt = *opt;
ctx->reg = db_open_rbt(ctx);