Fixes a user-after-free retrieving stats from _get_property()
GST_OBJECT_LOCK (filter);
- if (!filter->first_session)
+ if (!filter->first_session) {
srtp_dealloc (filter->session);
+ filter->session = NULL;
+ }
if (filter->streams)
nb = g_hash_table_foreach_remove (filter->streams, remove_yes, NULL);
static void
gst_srtp_enc_reset_no_lock (GstSrtpEnc * filter)
{
- if (!filter->first_session)
+ if (!filter->first_session) {
srtp_dealloc (filter->session);
+ filter->session = NULL;
+ }
filter->first_session = TRUE;
filter->key_changed = FALSE;