Change-Id: I7826b86e4d4cc921b2daaca5c8dda0fd27faae10
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
{
if (!__atomic_sub_fetch(&stubws->refcount, 1, __ATOMIC_RELAXED)) {
drop_all_events(stubws);
{
if (!__atomic_sub_fetch(&stubws->refcount, 1, __ATOMIC_RELAXED)) {
drop_all_events(stubws);
- afb_evt_listener_unref(stubws->listener);
+ if (stubws->listener)
+ afb_evt_listener_unref(stubws->listener);
release_sessions(stubws);
afb_proto_ws_unref(stubws->proto);
afb_cred_unref(stubws->cred);
release_sessions(stubws);
afb_proto_ws_unref(stubws->proto);
afb_cred_unref(stubws->cred);