Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

dns getaddrinfo 资源应及时释放 #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexsunday
Copy link

在mqtt_resolve_uri 中,调用了 getaddrinfo,直到 _exit时才释放,但中途mbedtls_client_connect 又会再次使用此函数,此函数不可重入,会直接导致失败。

此处可安全提前释放资源。

之前提交的PR,使用 github 的编辑器,会自动转换 gbk to utf8,不方便查看,故重新提交。

@majianjia
Copy link

@alexsunday 测试了一下,加上你修改的代码后不能连上MQTT服务器

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants