mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +00:00
Fix potential leak in handle_directory_request()
This commit is contained in:
1 parent
6a43bd952f
commit
cb601b7718
1 file changed
+1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user