]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
daemon/http: add helper assert to detect potential memleak
authorTomas Krizek <tomas.krizek@nic.cz>
Fri, 2 Jul 2021 09:46:45 +0000 (11:46 +0200)
committerTomas Krizek <tomas.krizek@nic.cz>
Wed, 21 Jul 2021 09:22:29 +0000 (11:22 +0200)
daemon/http.c

index 507a3e1a3411cc9b7577779ca767bec2b6ed2ed3..827638688f8030c3b864951be9f46f61d59b7196 100644 (file)
@@ -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);