X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-hsrv.c;h=577ef8540a1789b7b8a11f880ff5a0064a53098b;hb=e5d40e32d1f01b98c7344dae3707a38720e08666;hp=91dff296a4bf8918c6d5bc9514c7212d00433514;hpb=13bd63c1bd4055cba1316042267b31c4776af256;p=src%2Fapp-framework-binder.git diff --git a/src/afb-hsrv.c b/src/afb-hsrv.c index 91dff296..577ef854 100644 --- 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)