HomeFreeBSD

Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled.

Description

Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled.

The code enabled when "DEBUG" is defined uses mem_alloc(), which is a
malloc(.., M_RPC, M_WAITOK | M_ZERO), but then calls gss_release_buffer()
which does a free(.., M_GSSAPI) to free the memory.
This patch fixes the problem by replacing mem_alloc() with a
malloc(.., M_GSSAPI, M_WAITOK | M_ZERO).
This bug affects almost no one, since the sources are not normally built
with "DEBUG" defined.

Submitted by: peter@ifm.liu.se
MFC after: 2 weeks

Details

Provenance
rmacklemAuthored on
Parents
rS345865: Replace read_random(9) with more appropriate arc4rand(9) KPIs
Branches
Unknown
Tags
Unknown