Windows: Correct refcount leak
authorJeffrey Altman <jaltman@your-file-system.com>
Mon, 7 May 2012 04:56:11 +0000 (00:56 -0400)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 7 May 2012 17:03:16 +0000 (10:03 -0700)
The new duplicate avoidance code in cm_QueueBKGRequest() leaked
a cm_scache_t and a cm_user_t reference count.

Change-Id: Iceaf32a8d20cf350024fe40e3185c723f6203676
Reviewed-on: http://gerrit.openafs.org/7365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>

src/WINNT/afsd/cm_daemon.c

index fffbdb8..c93e4bf 100644 (file)
@@ -313,6 +313,8 @@ void cm_QueueBKGRequest(cm_scache_t *scp, cm_bkgProc_t *procp, afs_uint32 p1, af
     lock_ReleaseWrite(&cm_daemonLockp[daemonID]);
 
     if (duplicate) {
+        cm_ReleaseSCache(scp);
+        cm_ReleaseUser(userp);
         free(rp);
     } else {
         osi_Wakeup((LONG_PTR) &cm_bkgListpp[daemonID]);