Fix potential leak in handle_directory_request()

This commit is contained in:
Sergey Lyubka committed 2011-03-31 18:04:46 +02:00
1 parent 6a43bd952f
commit cb601b7718
1 file changed
+1
+1
View File
@@ -2421,6 +2421,7 @@ static void handle_directory_request(struct mg_connection *conn,
}
if (entries == NULL) {
closedir(dirp);
send_http_error(conn, 500, "Cannot open directory",
"%s", "Error: cannot allocate memory");
return;