Skip to content

Commit

Permalink
* FIX [pub_handler] fix ctest pub_handler_test failed
Browse files Browse the repository at this point in the history
Signed-off-by: Moi Ran <maoyi.ran@emqx.io>
  • Loading branch information
RanMaoyi committed Apr 16, 2024
1 parent 8a7921e commit 84a2c84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nanomq/pub_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1104,7 +1104,7 @@ handle_pub(nano_work *work, struct pipe_content *pipe_ct, uint8_t proto,
topic = work->pub_packet->var_header.publish.topic_name.body;
uint32_t len = work->pub_packet->var_header.publish.topic_name.len;

if (work->config->auth_http.enable) {
if (work->config != NULL && work->config->auth_http.enable) {
struct topic_queue *tq = topic_queue_init(topic, len);
if (tq == NULL) {
log_error("topic_queue_init failed!");
Expand Down

0 comments on commit 84a2c84

Please sign in to comment.