From 298003f754667daab44239cf6da29ee155cbc0b7 Mon Sep 17 00:00:00 2001 From: Tomas Krizek Date: Fri, 2 Jul 2021 11:46:45 +0200 Subject: [PATCH] daemon/http: add helper assert to detect potential memleak --- daemon/http.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemon/http.c b/daemon/http.c index 4c6bb060d..0e8acc35f 100644 --- a/daemon/http.c +++ b/daemon/http.c @@ -365,6 +365,7 @@ static int header_callback(nghttp2_session *h2, const nghttp2_frame *frame, return 0; } + kr_assert(ctx->uri_path == NULL); ctx->uri_path = malloc(sizeof(*ctx->uri_path) * (valuelen + 1)); if (!ctx->uri_path) return kr_error(ENOMEM); -- 2.47.3