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:
13bd63c
)
fix SEGFLT when unhendled request
author
José Bollo
<jose.bollo@iot.bzh>
Mon, 27 Feb 2017 08:31:33 +0000
(09:31 +0100)
committer
José Bollo
<jose.bollo@iot.bzh>
Mon, 27 Feb 2017 08:31:33 +0000
(09:31 +0100)
Change-Id: I34c657972111db843d0d9d26a1732b21ac519c57
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
src/afb-hsrv.c
patch
|
blob
|
history
diff --git
a/src/afb-hsrv.c
b/src/afb-hsrv.c
index
91dff29
..
577ef85
100644
(file)
--- a/
src/afb-hsrv.c
+++ b/
src/afb-hsrv.c
@@
-238,9
+238,11
@@
static void end_handler(void *cls, struct MHD_Connection *connection, void **rec
struct afb_hreq *hreq;
hreq = *recordreq;
- if (hreq->upgrade)
- MHD_suspend_connection (connection);
- afb_hreq_unref(hreq);
+ if (hreq) {
+ if (hreq->upgrade)
+ MHD_suspend_connection (connection);
+ afb_hreq_unref(hreq);
+ }
}
void run_micro_httpd(struct afb_hsrv *hsrv)