diff --git a/sapi/cgi/cgi_main.c b/sapi/cgi/cgi_main.c index b5e7999c3ce..e8d3601923a 100644 --- a/sapi/cgi/cgi_main.c +++ b/sapi/cgi/cgi_main.c @@ -1363,9 +1363,8 @@ static void init_request_info(fcgi_request *request) /* PATH_TRANSLATED = PATH_TRANSLATED - SCRIPT_NAME + PATH_INFO */ size_t ptlen = strlen(pt) - strlen(env_script_name); size_t path_translated_len = ptlen + (env_path_info ? strlen(env_path_info) : 0); - char *path_translated = NULL; - path_translated = (char *) emalloc(path_translated_len + 1); + char *path_translated = (char *) emalloc(path_translated_len + 1); memcpy(path_translated, pt, ptlen); if (env_path_info) { memcpy(path_translated + ptlen, env_path_info, path_translated_len - ptlen);