Skip to content

mqtt_set_will_options 使用问题 #109

@Zeepunt

Description

@Zeepunt

目前看代码发现,使用 mqtt_set_will_options 函数设置遗嘱时,会分配内存。

int mqtt_set_will_options(mqtt_client_t* c, char *topic, mqtt_qos_t qos, uint8_t retained, char *message)
{
    if (NULL == c->mqtt_will_options) {
        c->mqtt_will_options = (mqtt_will_options_t *)platform_memory_alloc(sizeof(mqtt_will_options_t));
        MQTT_ROBUSTNESS_CHECK(c->mqtt_will_options, MQTT_MEM_NOT_ENOUGH_ERROR);
    }

但是在使用 mqtt_release 释放 client 时并没有释放该内存,请问下这部分在哪里处理的?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions