]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix malloc stats for the RPCSEC_GSS server code when DEBUG is enabled.
authorrmacklem <rmacklem@FreeBSD.org>
Thu, 4 Apr 2019 01:23:06 +0000 (01:23 +0000)
committerrmacklem <rmacklem@FreeBSD.org>
Thu, 4 Apr 2019 01:23:06 +0000 (01:23 +0000)
commite349a3602c453679d596e7f3331741aac05825a3
tree548841e841541c4e3c12aa398610d99016cbcabd
parent33133b3b41a3dfd6204155c22b7d0d14039152ed
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
sys/rpc/rpcsec_gss/svc_rpcsec_gss.c