[2024-05-30 21:54] Philipp <phil...@bureaucracy.de> > I have also implement some fallback handler for the old api. They are > primary for simpler testing and development. Patcher are tested with > table-ldap and attached. The patches are currenty seperated by query > type. For the push I would put them togetter in one commit.
I noticed some missing frees in the code. Fixes are attached. Philipp
From f1492ea87f501c0949ff410ede064b9431842f82 Mon Sep 17 00:00:00 2001 From: Philipp Takacs <phil...@bureaucracy.de> Date: Fri, 31 May 2024 15:10:12 +0200 Subject: [PATCH 10/11] fixup! add error result function --- table_api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/table_api.c b/table_api.c index 694be68..9f0fe9c 100644 --- a/table_api.c +++ b/table_api.c @@ -288,6 +288,7 @@ table_api_error(const char *id, const char *error) #endif if (fflush(stdout) == EOF) err(1, "fflush"); + free(req); } void -- 2.39.2
From ff1bf8dfe89dbf6a01e5a32c6530ca04b7287866 Mon Sep 17 00:00:00 2001 From: Philipp Takacs <phil...@bureaucracy.de> Date: Fri, 31 May 2024 15:11:09 +0200 Subject: [PATCH 11/11] fixup! implement async lookup --- table_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/table_api.c b/table_api.c index 9f0fe9c..b5cce42 100644 --- a/table_api.c +++ b/table_api.c @@ -252,6 +252,7 @@ void table_api_error(const char *id, const char *error) { struct request *req; + struct evbuffer *res; req = dict_pop(&requests, id); @@ -289,6 +290,9 @@ table_api_error(const char *id, const char *error) if (fflush(stdout) == EOF) err(1, "fflush"); free(req); + res = dict_pop(&lookup_entries, id); + if (res) + evbuffer_free(res); } void -- 2.39.2