]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: Add assert to make sure http_client_init_shared(NULL, NULL) isn't called
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Thu, 30 Aug 2018 13:40:16 +0000 (16:40 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Mon, 18 Feb 2019 08:53:42 +0000 (08:53 +0000)
This should make scan-build happy.

src/lib-http/http-client.c

index 4c724513d246b133a7b9961d7641131eb57e4e20..f8de81a8ac068d84e942f3ea5170b897ee793f85 100644 (file)
@@ -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: ";
        }