rxkad: Use rxi_Alloc not osi_Alloc
authorSimon Wilkinson <sxw@your-file-system.com>
Sun, 9 Sep 2012 09:19:53 +0000 (10:19 +0100)
committerDerrick Brashear <shadow@your-file-system.com>
Sun, 9 Sep 2012 11:59:38 +0000 (04:59 -0700)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

src/rxkad/rxkad_server.c

index 048458c..be0abef 100644 (file)
@@ -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));