windows-server-xdr-free-20090614
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 15 Jun 2009 01:56:22 +0000 (01:56 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 15 Jun 2009 01:56:22 +0000 (01:56 +0000)
LICENSE MIT

when releasing the capabilities memory allocation use xdr_free() not
the free() of the afsd_service.exe module.

src/WINNT/afsd/cm_server.c

index 545f686..a7aea33 100644 (file)
@@ -117,7 +117,7 @@ cm_PingServer(cm_server_t *tsp)
        /* we currently handle 32-bits of capabilities */
        if (caps.Capabilities_len > 0) {
            tsp->capabilities = caps.Capabilities_val[0];
-           free(caps.Capabilities_val);
+           xdr_free(caps.Capabilities_val, caps.Capabilities_len);
            caps.Capabilities_len = 0;
            caps.Capabilities_val = 0;
        } else {
@@ -380,7 +380,7 @@ static void cm_CheckServersMulti(afs_uint32 flags, cm_cell_t *cellp)
                 /* we currently handle 32-bits of capabilities */
                 if (caps[i].Capabilities_len > 0) {
                     tsp->capabilities = caps[i].Capabilities_val[0];
-                    free(caps[i].Capabilities_val);
+                    xdr_free(caps[i].Capabilities_val, caps[i].Capabilities_len);
                     caps[i].Capabilities_len = 0;
                     caps[i].Capabilities_val = 0;
                 } else {