diff --git a/plugins/cgi/cgi_plugin.c b/plugins/cgi/cgi_plugin.c index 490f8a92..e4f4245a 100644 --- a/plugins/cgi/cgi_plugin.c +++ b/plugins/cgi/cgi_plugin.c @@ -368,6 +368,7 @@ char *uwsgi_cgi_get_docroot(char *path_info, uint16_t path_info_len, int *need_f if (choosen_udd->status == 0) { char *tmp_udd = uwsgi_malloc(PATH_MAX+1); if (!realpath(path, tmp_udd)) { + free(tmp_udd); return NULL; }