From 94f7565a92301a414df49b356c9cc8f5235b3348 Mon Sep 17 00:00:00 2001 From: Oleg Moskalenko Date: Sat, 27 Feb 2016 01:22:25 -0800 Subject: [PATCH] Issue #36 fixed. --- src/apps/relay/http_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/relay/http_server.c b/src/apps/relay/http_server.c index 7228813..e32b0bc 100644 --- a/src/apps/relay/http_server.c +++ b/src/apps/relay/http_server.c @@ -168,12 +168,12 @@ static struct http_request* parse_http_request_1(struct http_request* ret, char* } const char *path = evhttp_uri_get_path(uri); - if(path) + if(path && ret) ret->path = strdup(path); evhttp_uri_free(uri); - if(parse_post) { + if(parse_post && ret) { char *body = strstr(s+1,"\r\n\r\n"); if(body && body[0]) { if(!ret->headers) {