afb-hreq: Fix a leak on websocket upgrade
[src/app-framework-binder.git] / src / afb-hreq.c
index 9c63091..dc02e6f 100644 (file)
@@ -330,6 +330,8 @@ void afb_hreq_addref(struct afb_hreq *hreq)
 
 void afb_hreq_unref(struct afb_hreq *hreq)
 {
+       if (hreq->replied)
+               hreq->xreq.replied = 1;
        afb_xreq_unref(&hreq->xreq);
 }