Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

mosquitto_connect seems to leak memory when using TLS #1116

Closed
Pehoh opened this issue Jan 22, 2019 · 4 comments
Closed

mosquitto_connect seems to leak memory when using TLS #1116

Pehoh opened this issue Jan 22, 2019 · 4 comments

Comments

@Pehoh
Copy link

Pehoh commented Jan 22, 2019

When using mosquitto_connect() with these functions called before:

  • mosquitto_lib_init()
  • mosquitto_new()
  • mosquitto_connect_callback_set()
  • mosquitto_message_callback_set()
  • mosquitto_publish_callback_set()
  • mosquitto_username_pw_set()
  • mosquitto_tls_set()
  • mosquitto_tls_opts_set()

Valgrind reports me some memory lost (20 bytes definitely lost and 16 bytes indirectly lost).

If I remove the TLS part of my application (mosquitto_tls_set() and mosquitto_tls_opts_set()) and remove the TLS configuration on the broker, the memory lost fall to 0 byte.

Configuration:
Mosquitto 1.5.3, TLS v1.2, server certificate only.

Are you aware of this?

@ralight
Copy link
Contributor

ralight commented Jan 23, 2019

Could you provide the two valgrind traces please?

@Pehoh
Copy link
Author

Pehoh commented Feb 1, 2019

I'm sorry but I'm not able to reproduce the memory lost by isolating the mosquitto calls only. I think it is part of my application. I still don't know why it is not leaking when I disable the TLS. I will try to extract a sample code in the next days.

@aaronovz1
Copy link

Maybe related to #592 which was fixed in 1.5.4?

@ralight
Copy link
Contributor

ralight commented Apr 26, 2019

I can't reproduce this myself, and you were having trouble doing the same, plus this has been dormant for a while so I'm going to close this issue. If it is still a problem please reopen and provide details.

@ralight ralight closed this as completed Apr 26, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 7, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants