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

possible memory leak? #72

Open
applehxb opened this issue Jul 9, 2024 · 5 comments
Open

possible memory leak? #72

applehxb opened this issue Jul 9, 2024 · 5 comments

Comments

@applehxb
Copy link

applehxb commented Jul 9, 2024

Excuse me, why smtp and pop3 protocols do not register proto_free functions like HTTP protocols, will this cause ctx->protoctx->arg memory leaks of smtp and pop3 protocols ?

@sonertari
Copy link
Owner

Yes, I think you're right, that is expected to cause memory leaks. I'll check again to see if I'm missing something. If not, I should create proto_free functions for them too. Good catch, thanks.
Btw, how did you find this issue, manual inspection or a tool like valgrind?

sonertari added a commit that referenced this issue Jul 11, 2024
@sonertari
Copy link
Owner

Fixed now, thanks

@applehxb
Copy link
Author

Yes, I think you're right, that is expected to cause memory leaks. I'll check again to see if I'm missing something. If not, I should create proto_free functions for them too. Good catch, thanks. Btw, how did you find this issue, manual inspection or a tool like valgrind?

Very glad to receive your reply. I didn't find the issue by tool, just with code review. I am very interested in the SSLproxy project, which is excellent. I am recently interested in SSL proxy, mail protocol proxy, mail content filtering, so I am learning this project code. Btw, currently this project supports SMTP/POP3, will IMAP be supported in the future? Thank you very much.

@sonertari
Copy link
Owner

IMAP has been in my todo list for more than 4 years now, but there are more important todo items in the list, so I wouldn't expect it any time soon.

@sonertari
Copy link
Owner

Btw, you can use tcp and ssl proxyspecs for imap and imaps protocols. I've never tried myself, but if we don't have to do anything special for IMAP, it should work. (But we do special things for smtp for request/response packets and protocol validation, as I guess you have seen.)

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

No branches or pull requests

2 participants