Check if req is NULL before dereferencing it.

This commit is contained in:
Joris Vink 2014-04-16 22:15:22 +02:00
parent 52a0764812
commit c206f3be89
1 changed files with 1 additions and 1 deletions

View File

@ -636,7 +636,7 @@ spdy_data_frame_recv(struct netbuf *nb)
}
req = (struct http_request *)s->httpreq;
if (req->method != HTTP_METHOD_POST || req == NULL) {
if (req == NULL || req->method != HTTP_METHOD_POST) {
kore_debug("data frame for non post received");
/* stream error */
return (KORE_RESULT_ERROR);