HomeFreeBSD

qoriq_therm.c: avoid a segfault on the error exit path.

Description

qoriq_therm.c: avoid a segfault on the error exit path.

If anything goes wrong during attach() it is handled with a 'goto fail'
which calls sysctl_ctx_free(). But the sysctl context doesn't get
initialized until very late in attach(), so almost any error just results
in a segfault. Move the sysctl_ctx_init() call to the beginning of the
attach() function, so that it is done before any errors can happen that
will lead to freeing the context.

Details

Provenance
ianAuthored on Sep 28 2021, 6:19 PM
Parents
rG819961c5808b: Temporarily skip sys.geom.class.multipath.failloop.failloop in CI
Branches
Unknown
Tags
Unknown