From 9a4f23e3e3e249f76fb54ad6da75b0e39d3f6ee1 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 507a3e1a3..827638688 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