Fix user-after-free on HTTP_Server 'system' ept

v2.x-4510
Javier Jaramago Fernández 2 years ago
parent e91bcd2c81
commit 50972bd15d

@ -586,7 +586,7 @@ int ProxySQL_HTTP_Server::handler(void *cls, struct MHD_Connection *connection,
delete cpu_sqlite;
s.append("</body></html>");
response = MHD_create_response_from_buffer(s.length(), (void *) s.c_str(), MHD_RESPMEM_PERSISTENT);
response = MHD_create_response_from_buffer(s.length(), (void *) s.c_str(), MHD_RESPMEM_MUST_COPY);
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
MHD_destroy_response (response);
return ret;

Loading…
Cancel
Save