Skip to content

Open Source alternative to Algolia + Pinecone and an Easier-to-Use alternative to ElasticSearch ⚡ 🔍 ✨ Fast, typo tolerant, in-memory fuzzy Search Engine for building delightful search experiences

Fix api auth key memory allocation warning.

Kishore Nallan14de7746edfa
diff --git a/src/http_server.cpp b/src/http_server.cpp
index 9b4d5f09..e534f930 100644
--- a/src/http_server.cpp
+++ b/src/http_server.cpp
@@ -273,6 +273,8 @@ void HttpServer::on_res_generator_dispose(void *self) {
custom_generator->res()->notify();
}
+ // without this, warning about memory allocated by std::string leaking happens
+ std::string().swap(custom_generator->h2o_handler->api_auth_key_sent);
delete custom_generator;
}