From 542dad75733354a6fb1e912d3ff75d414459078b Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Mon, 7 May 2012 00:56:11 -0400 Subject: [PATCH] Windows: Correct refcount leak 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 Reviewed-by: Jeffrey Altman Tested-by: Jeffrey Altman --- src/WINNT/afsd/cm_daemon.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/WINNT/afsd/cm_daemon.c b/src/WINNT/afsd/cm_daemon.c index fffbdb85a8..c93e4bf40a 100644 --- a/src/WINNT/afsd/cm_daemon.c +++ b/src/WINNT/afsd/cm_daemon.c @@ -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]);