From: Simon Wilkinson Date: Sun, 9 Sep 2012 09:19:53 +0000 (+0100) Subject: rxkad: Use rxi_Alloc not osi_Alloc X-Git-Tag: openafs-stable-1_8_0pre1~2022 X-Git-Url: http://git.openafs.org/?p=openafs.git;a=commitdiff_plain;h=9953a23699044e9e8e5b70e83058578ba862a7cb rxkad: Use rxi_Alloc not osi_Alloc rx exposes the rxi_Alloc function to be used for memory allocation in security classes, not osi_Alloc which is private. Using rxi_Alloc means that allocations are counted in the general rx statistics. Modify rxkad so that it uses rxi_Alloc. This also restores symmetry in the allocator - the memory that's allocated by rxkad_server is already freed using rxi_Free in rxkad_DestroyConnection Change-Id: I3321355f2470974d3570dd911f06ea91c21d1c9d Reviewed-on: http://gerrit.openafs.org/8067 Tested-by: BuildBot Reviewed-by: Derrick Brashear --- diff --git a/src/rxkad/rxkad_server.c b/src/rxkad/rxkad_server.c index 048458c..be0abef 100644 --- a/src/rxkad/rxkad_server.c +++ b/src/rxkad/rxkad_server.c @@ -145,12 +145,12 @@ rxkad_NewServerSecurityObject(rxkad_level level, void *get_key_rock, return 0; size = sizeof(struct rx_securityClass); - tsc = osi_Alloc(size); + tsc = rxi_Alloc(size); memset(tsc, 0, size); tsc->refCount = 1; /* caller has one reference */ tsc->ops = &rxkad_server_ops; size = sizeof(struct rxkad_sprivate); - tsp = osi_Alloc(size); + tsp = rxi_Alloc(size); memset(tsp, 0, size); tsc->privateData = (char *)tsp; @@ -416,7 +416,7 @@ rxkad_CheckResponse(struct rx_securityClass *aobj, return RXKADNOAUTH; } else { /* save the info for later retreival */ int size = sizeof(struct rxkad_serverinfo); - rock = osi_Alloc(size); + rock = rxi_Alloc(size); memset(rock, 0, size); rock->kvno = kvno; memcpy(&rock->client, &client, sizeof(rock->client));