Skip to content

Commit 1c89919

Browse files
committed
Fix f-2739 broker free props
1 parent f985e4b commit 1c89919

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/mqtt_broker.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3373,6 +3373,9 @@ static int BrokerHandle_PublishRel(BrokerClient* bc, int rx_len)
33733373
}
33743374

33753375
#ifdef WOLFMQTT_V5
3376+
if (resp.props) {
3377+
(void)MqttProps_Free(resp.props);
3378+
}
33763379
resp.reason_code = MQTT_REASON_SUCCESS;
33773380
resp.props = NULL;
33783381
#endif
@@ -3411,6 +3414,9 @@ static int BrokerHandle_PublishRec(BrokerClient* bc, int rx_len)
34113414
}
34123415

34133416
#ifdef WOLFMQTT_V5
3417+
if (resp.props) {
3418+
(void)MqttProps_Free(resp.props);
3419+
}
34143420
resp.reason_code = MQTT_REASON_SUCCESS;
34153421
resp.props = NULL;
34163422
#endif

0 commit comments

Comments
 (0)