From: Tomas Krizek Date: Fri, 2 Jul 2021 09:46:45 +0000 (+0200) Subject: daemon/http: add helper assert to detect potential memleak X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9a4f23e3e3e249f76fb54ad6da75b0e39d3f6ee1;p=thirdparty%2Fknot-resolver.git daemon/http: add helper assert to detect potential memleak --- 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);