Unix CM: Use xdr_free to free memory allocated by XDR

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>
This commit is contained in:
Jeffrey Altman 2009-12-30 11:32:58 +00:00 committed by Derrick Brashear
parent 54c4ce48bf
commit e4eb19cdc0

View 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;