From: Timo Sirainen Date: Thu, 30 Aug 2018 13:40:16 +0000 (+0300) Subject: lib-http: Add assert to make sure http_client_init_shared(NULL, NULL) isn't called X-Git-Tag: 2.3.9~1480 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c6ffed8d699ee5eb9caddfc097589c66c2701e5;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Add assert to make sure http_client_init_shared(NULL, NULL) isn't called This should make scan-build happy. --- diff --git a/src/lib-http/http-client.c b/src/lib-http/http-client.c index 4c724513d2..f8de81a8ac 100644 --- a/src/lib-http/http-client.c +++ b/src/lib-http/http-client.c @@ -121,6 +121,7 @@ http_client_init_shared(struct http_client_context *cctx, http_client_context_ref(cctx); log_prefix = t_strdup_printf("http-client[%u]: ", id); } else { + i_assert(set != NULL); client->cctx = cctx = http_client_context_create(set); log_prefix = "http-client: "; }