[Box Backup-commit] COMMIT r3534 - box/trunk/lib/backupstore

subversion at boxbackup.org subversion at boxbackup.org
Thu Feb 26 21:03:06 GMT 2015


Author: chris
Date: 2015-02-26 21:03:06 +0000 (Thu, 26 Feb 2015)
New Revision: 3534

Modified:
   box/trunk/lib/backupstore/HousekeepStoreAccount.cpp
Log:
Fix crash when compiled in release mode caused by refcount not decrementing.

The call to decrement the refcount was in an ASSERT macro, so compiled out in
release mode.


Modified: box/trunk/lib/backupstore/HousekeepStoreAccount.cpp
===================================================================
--- box/trunk/lib/backupstore/HousekeepStoreAccount.cpp	2015-02-25 22:04:09 UTC (rev 3533)
+++ box/trunk/lib/backupstore/HousekeepStoreAccount.cpp	2015-02-26 21:03:06 UTC (rev 3534)
@@ -864,7 +864,8 @@
 	}
 
 	// Drop reference count by one. Must now be zero, to delete the file.
-	ASSERT(!mapNewRefs->RemoveReference(ObjectID))
+	bool remaining_refs = mapNewRefs->RemoveReference(ObjectID);
+	ASSERT(!remaining_refs);
 
 	// Delete from disc
 	BOX_TRACE("Removing unreferenced object " <<




More information about the Boxbackup-commit mailing list