tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 334fe6bb6b124c2f3eb1186610999446d57cde76
parent 9e36b0beb9dc6fe02d43b4c217841c8164f41774
Author: teor <teor2345@gmail.com>
Date:   Sun, 28 May 2017 22:16:00 +1000

Don't underflow usage when it is unknown and a file is removed

Part of #22424.

Diffstat:
Msrc/common/storagedir.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/storagedir.c b/src/common/storagedir.c @@ -425,7 +425,7 @@ storage_dir_remove_file(storage_dir_t *d, } } if (unlink(ipath) == 0) { - if (! BUG(d->usage < size)) { + if (d->usage_known && ! BUG(d->usage < size)) { d->usage -= size; } } else {