summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trackerlogic.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/trackerlogic.c b/trackerlogic.c
index 5ff448f..26d50f4 100644
--- a/trackerlogic.c
+++ b/trackerlogic.c
@@ -99,6 +99,12 @@ static int vector_remove_peer( ot_vector *vector, ot_peer *peer ) {
99 vector->space /= OT_VECTOR_SHRINK_RATIO; 99 vector->space /= OT_VECTOR_SHRINK_RATIO;
100 vector->data = realloc( vector->data, vector->space * sizeof( ot_peer ) ); 100 vector->data = realloc( vector->data, vector->space * sizeof( ot_peer ) );
101 } 101 }
102 if( !vector->size ) {
103 /* for peer pools its safe to let them go,
104 in 999 of 1000 this happens in older pools, that won't ever grow again */
105 free( vector->data );
106 vector->space = 0;
107 }
102 return exactmatch; 108 return exactmatch;
103} 109}
104 110