Skip to content

Commit

Permalink
* MDF [trantest] fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
JaylinYu committed May 6, 2023
1 parent 83ac461 commit 2aaa84b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions tests/trantest.h
Original file line number Diff line number Diff line change
Expand Up @@ -680,8 +680,8 @@ trantest_mqtt_sub_pub(trantest *tt)
nng_mqtt_client_free(client, true);
nng_close(tt->repsock);
nng_close(tt->reqsock);
conn_param_free(cp1);
conn_param_free(cp2);
// conn_param_free(cp1);
// conn_param_free(cp2);
});
}

Expand Down Expand Up @@ -1136,8 +1136,7 @@ trantest_mqtt_broker_send_recv(trantest *tt)
// send CONNACK back to the client.
nng_aio_set_msg(work->aio, rmsg);
nng_ctx_send(work->ctx, work->aio);
// cp is cloned in protocol and app layer, so we free it twice.
conn_param_free(cp);
// cp is cloned in protocol layer, so we free it here
conn_param_free(cp);

// client recv CONNACK msg.
Expand Down Expand Up @@ -1194,7 +1193,6 @@ trantest_mqtt_broker_send_recv(trantest *tt)
// here to aviod heap-use-after-free.
nng_close(tt->repsock);
conn_param_free(rcp);
conn_param_free(rcp);
nng_msg_free(msg);
// for previously pub msg
conn_param_free(cp);
Expand Down

0 comments on commit 2aaa84b

Please sign in to comment.