summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/afb-stub-ws.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/afb-stub-ws.c b/src/afb-stub-ws.c
index 16475927..a8af53cc 100644
--- a/src/afb-stub-ws.c
+++ b/src/afb-stub-ws.c
@@ -651,10 +651,12 @@ static void on_hangup(void *closure)
{
struct afb_stub_ws *stubws = closure;
+ afb_stub_ws_addref(stubws);
if (stubws->on_hangup)
stubws->on_hangup(stubws);
release_sessions(stubws);
+ afb_stub_ws_unref(stubws);
}
/*****************************************************/