Free security objects used in VolForward
authorChaskiel Grundman <cg2v@andrew.cmu.edu>
Sat, 9 Mar 2013 00:19:05 +0000 (19:19 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Tue, 2 Dec 2014 01:21:35 +0000 (20:21 -0500)
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 <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

src/volser/volprocs.c

index 11b98f7..941342a 100644 (file)
@@ -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);