From ec12220404cf7b1e4682ec83c2cd2b2917a31c6a Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Sat, 30 Jun 2007 13:19:57 +0000 Subject: [PATCH] make decrementing the torrent count the last thing we do when destroying a torrent. --- libtransmission/torrent.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/torrent.c b/libtransmission/torrent.c index 646e56188..fb8767e44 100644 --- a/libtransmission/torrent.c +++ b/libtransmission/torrent.c @@ -907,8 +907,6 @@ tr_torrentFree( tr_torrent_t * tor ) tr_sharedLock( h->shared ); - h->torrentCount--; - tr_rwClose( &tor->lock ); tr_cpClose( tor->completion ); @@ -931,6 +929,8 @@ tr_torrentFree( tr_torrent_t * tor ) tr_free( tor ); + h->torrentCount--; + tr_sharedUnlock( h->shared ); }