HomeFreeBSD

contrib/apr: Remove scope leak UB

Description

contrib/apr: Remove scope leak UB

In apr_vformatter, the variable buf was declared inside a limited scope
region, but a pointer to it is leaked outside of that region and used
later. This is undefined behavior. Fix by moving the buf variable to
function scope.

Reported by: Coverity
CID: 1192541

Details

Provenance
cemAuthored on
Parents
rS357298: Add missing mutex unlock in failure case.
Branches
Unknown
Tags
Unknown