* FIX [broker] do not use dynamic array to pass win build CI
@@ -837,8 +837,7 @@ broker(conf *nanomq_conf)
}
}
- // struct work **works = nng_zalloc(num_ctx * sizeof(struct work *));
- struct work *works[num_ctx];
+ struct work **works = nng_zalloc(num_ctx * sizeof(struct work *));
// create broker ctx
for (i = 0; i < nanomq_conf->parallel; i++) {
works[i] = proto_work_init(sock, sock,
@@ -929,7 +928,7 @@ broker(conf *nanomq_conf)
nng_free(works[i]->pipe_ct, sizeof(struct pipe_content));
nng_free(works[i], sizeof(struct work));
}
- // nng_free(works, num_ctx * sizeof(struct work *));
+ nng_free(works, num_ctx * sizeof(struct work *));
exit(0);
}
