From 1e1f6e4e8f70b0994ba7fdfaeb9df926709b806b Mon Sep 17 00:00:00 2001 From: Chaskiel Grundman Date: Fri, 8 Mar 2013 19:19:05 -0500 Subject: [PATCH] Free security objects used in VolForward VolForward and VolForwardMulti create rx security objects, but never free them. The RXS_Close's are positioned where they are to limit the need for conditionals Change-Id: Iec6879270ad54c30c1fea571cea583afaca9364b Reviewed-on: http://gerrit.openafs.org/9527 Reviewed-by: D Brashear Reviewed-by: Benjamin Kaduk Tested-by: BuildBot --- src/volser/volprocs.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/volser/volprocs.c b/src/volser/volprocs.c index 11b98f788e..941342a523 100644 --- a/src/volser/volprocs.c +++ b/src/volser/volprocs.c @@ -1300,6 +1300,9 @@ VolForward(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate, rx_NewConnection(htonl(destination->destHost), htons(destination->destPort), VOLSERVICE_ID, securityObject, securityIndex); + + RXS_Close(securityObject); /* will be freed after connection destroyed */ + if (!tcon) { TClearRxCall(tt); TRELE(tt); @@ -1432,6 +1435,9 @@ SAFSVolForwardMultiple(struct rx_call *acid, afs_int32 fromTrans, afs_int32 } } + /* Security object will be freed when all connections destroyed */ + RXS_Close(securityObject); + /* these next calls implictly call rx_Write when writing out data */ code = DumpVolMulti(tcalls, i, vp, fromDate, 0, codes);