HomeFreeBSD

Fix undefined behavior when using asmc_fan_getstring()

Description

Fix undefined behavior when using asmc_fan_getstring()

It was returning a pointer to stack-allocated memory, so make the
allocation at the caller instead.

Found by: clang static analyzer
Coverity: CID 1245774
Reviewed by: ed, rpaulo
Review URL: https://reviews.freebsd.org/D4740

Details

Provenance
uqsAuthored on
Reviewer
ed
Parents
rS293192: Fix for directly connected FULL or LOW speed USB devices.
Branches
Unknown
Tags
Unknown