From 033ee7ff588c2662e2be05c451948ecd8e087825 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Mon, 26 Nov 2007 20:44:19 +0000 Subject: [PATCH] fix crash-on-exit introduced by stats code --- libtransmission/stats.c | 2 ++ libtransmission/transmission.c | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libtransmission/stats.c b/libtransmission/stats.c index 5895c3cc3..90ab8e97d 100644 --- a/libtransmission/stats.c +++ b/libtransmission/stats.c @@ -119,12 +119,14 @@ tr_statsInit( tr_handle * handle ) stats->cumulative.sessionCount++; stats->startTime = time(NULL); handle->sessionStats = stats; +fprintf( stderr, "handle %p sessionStats is %p\n", handle, handle->sessionStats ); } void tr_statsClose( tr_handle * handle ) { tr_session_stats tmp; +fprintf( stderr, "handle %p sessionStats is %p\n", handle, handle->sessionStats ); tr_getCumulativeSessionStats( handle, &tmp ); saveCumulativeStats( &tmp ); diff --git a/libtransmission/transmission.c b/libtransmission/transmission.c index dab5765dc..df4031a2a 100644 --- a/libtransmission/transmission.c +++ b/libtransmission/transmission.c @@ -326,8 +326,6 @@ tr_closeImpl( void * vh ) for( t=h->torrentList; t!=NULL; t=t->next ) tr_torrentClose( t ); - tr_statsClose( h ); - tr_peerMgrFree( h->peerMgr ); tr_rcClose( h->upload );