diff options
author | Edward Hervey <edward@collabora.com> | 2014-04-16 15:37:57 +0200 |
---|---|---|
committer | Edward Hervey <edward@collabora.com> | 2014-04-16 15:37:57 +0200 |
commit | d16cc860a381f4f5a7030b6a944f31cdcbc5a98e (patch) | |
tree | 8b08892b6cb92abc0b8df9711ab70bdd25567104 /sys | |
parent | 1a42aaad4730a7039660c1af0b30868f40e729f1 (diff) |
dvb/camsession: Don't do operations on unexisting sessions
CID #206114
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dvb/camsession.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dvb/camsession.c b/sys/dvb/camsession.c index fadb7c318..3f737d3af 100644 --- a/sys/dvb/camsession.c +++ b/sys/dvb/camsession.c @@ -451,15 +451,16 @@ handle_close_session_request (CamSL * sl, CamTLConnection * connection, session = g_hash_table_lookup (sl->sessions, GINT_TO_POINTER ((guint) session_nb)); + if (session == NULL) { GST_WARNING ("got CLOSE_SESSION_REQUEST for unknown session: %d", session_nb); + return CAM_RETURN_OK; + } - status = 0xF0; - } else if (session->state == CAM_SL_SESSION_STATE_CLOSING) { + if (session->state == CAM_SL_SESSION_STATE_CLOSING) { GST_WARNING ("got CLOSE_SESSION_REQUEST for closing session: %d", session_nb); - status = 0xF0; } |