ctx: initialize field 'verbosity'

Uninitialized field can contain a garbage and break expected logs
behavior.
This commit is contained in:
Dmitry Podgorny
2021-12-02 00:08:34 +02:00
parent 44a5556278
commit 07a4f778d3

View File

@@ -440,6 +440,7 @@ xmpp_ctx_t *xmpp_ctx_new(const xmpp_mem_t *mem, const xmpp_log_t *log)
ctx->loop_status = XMPP_LOOP_NOTSTARTED;
ctx->rand = xmpp_rand_new(ctx);
ctx->timeout = EVENT_LOOP_DEFAULT_TIMEOUT;
ctx->verbosity = 0;
if (ctx->rand == NULL) {
xmpp_free(ctx, ctx);
ctx = NULL;