Closed ghost closed 4 years ago
I have found a possible missing of "freeing memory" on "ConditionalAccessClose".
During call of "ConditionalAccessHandle" the function allocate memory for "system_ids" :
p_ids->i_nb_system_ids = l / 2; p_ids->pi_system_ids = malloc( p_ids->i_nb_system_ids * sizeof(uint16_t) );
After removing the DVB-CI slot cam the prevoius allocate memory is not "freed".
msg_Dbg( p_access, "closing ConditionalAccess session (%d)", i_session_id ); free( p_sessions[i_session_id - 1].p_sys );
the memory allocated for system id is not released.
I guess the right code should be:
system_ids_t *p_ids = (system_ids_t *)p_sessions[i_session_id - 1].p_sys; if ( p_ids->i_nb_system_ids ) free( p_ids->pi_system_ids ); msg_Dbg( p_access, "closing ConditionalAccess session (%d)", i_session_id ); free( p_sessions[i_session_id - 1].p_sys );
Am I right ?
I have found a possible missing of "freeing memory" on "ConditionalAccessClose".
During call of "ConditionalAccessHandle" the function allocate memory for "system_ids" :
After removing the DVB-CI slot cam the prevoius allocate memory is not "freed".
the memory allocated for system id is not released.
I guess the right code should be:
Am I right ?