Code Review
/
src
/
app-framework-binder.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
ba58e7f
)
afb-hreq: Fix a leak on websocket upgrade
author
José Bollo
<jose.bollo@iot.bzh>
Mon, 11 Sep 2017 15:50:13 +0000
(17:50 +0200)
committer
José Bollo
<jose.bollo@iot.bzh>
Mon, 11 Sep 2017 15:57:00 +0000
(17:57 +0200)
A 'no-reply' answer was created but not emitted nor
freed when http connection was upgraded to websocket.
Merging replied and xreq.replied was a possible
solution but I wanted not change much things.
Change-Id: I86c6c7ee52f69d50732e50fa6594f1d22d77ddfd
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-hreq.c
patch
|
blob
|
history
diff --git
a/src/afb-hreq.c
b/src/afb-hreq.c
index
9c63091
..
dc02e6f
100644
(file)
--- a/
src/afb-hreq.c
+++ b/
src/afb-hreq.c
@@
-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);
}