Unix CM: Use xdr_free to free memory allocated by XDR
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 30 Dec 2009 11:32:58 +0000 (11:32 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Mon, 4 Jan 2010 00:21:45 +0000 (16:21 -0800)
In src/afs/afs_volume.c VL_GetAddrsU() returns memory allocated by the
xdr package. In 1.4 there was no method of freeing this safely. On the
head there is using the xdr_free() function.

FIXES 124937

Change-Id: I72b8333e02e0e58dd16d25e9ed258a2551cdef9d
Reviewed-on: http://gerrit.openafs.org/1047
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

src/afs/afs_volume.c

index 387fd7b..43bf72f 100644 (file)
@@ -1100,8 +1100,8 @@ InstallUVolumeEntry(struct volume *av, struct uvldbentry *ve, int acell,
                ts = afs_GetServer(addrp, nentries, acell, cellp->fsport,
                                   WRITE_LOCK, &ve->serverNumber[i],
                                   ve->serverUnique[i]);
-               afs_osi_Free(addrs.bulkaddrs_val,
-                            addrs.bulkaddrs_len * sizeof(*addrp));
+               xdr_free(addrs.bulkaddrs_val,
+                        addrs.bulkaddrs_len * sizeof(*addrp));
            }
        }
        av->serverHost[j] = ts;