Commit 2b590f63 authored by Clément Stenac's avatar Clément Stenac

Fix

parent 4f86b958
...@@ -55,18 +55,16 @@ void stats_HandlerDestroy( stats_handler_t *p_stats ) ...@@ -55,18 +55,16 @@ void stats_HandlerDestroy( stats_handler_t *p_stats )
for ( i = p_stats->i_counters - 1 ; i >= 0 ; i-- ) for ( i = p_stats->i_counters - 1 ; i >= 0 ; i-- )
{ {
int j; int j;
counter * p_counter = p_stats->pp_counters[i]; counter_t * p_counter = p_stats->pp_counters[i];
for( j = p_counter->i_samples -1; j >= 0 ; j-- ) for( j = p_counter->i_samples -1; j >= 0 ; j-- )
{ {
counter_sample_t *p_sample = p_counter->pp_samples[j]; counter_sample_t *p_sample = p_counter->pp_samples[j];
if( p_sample->val.psz_string )
free( p_sample->val.psz_string );
REMOVE_ELEM( p_counter->pp_samples, p_counter->i_samples, j ); REMOVE_ELEM( p_counter->pp_samples, p_counter->i_samples, j );
free( p_sample ); free( p_sample );
} }
free( p_counter->psz_name ); free( p_counter->psz_name );
REMOVE_ELEM( p_stats->pp_counters, p_stats->i_counter, i ); REMOVE_ELEM( p_stats->pp_counters, p_stats->i_counters, i );
free( p_counter ); free( p_counter );
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment