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

Fix context leak when socket is not cloed explicitly #473

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

Conversation

nataraj-hates-MS-for-stealing-github

Fix memory leak described in #469.

If this patch is applied, this module build with ASan enabled no longer fails on following sample:

use strict;
use Symbol qw(gensym);
use Net::SSLeay::Handle;

my @uris = ('ya.ru', 'google.com');
#my @uris = ('google.com');

for my $uri (@uris)
{
  my $ssl = gensym();
  tie(*$ssl, "Net::SSLeay::Handle", $uri, 443);
  print $ssl "GET / HTTP/1.0\r\n\r\n";

  my $response = do { local $/ = undef; <$ssl> };
}

This does not solves all ASan related problems, but reduces failed tests from 13 to 11 for me.

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

Successfully merging this pull request may close these issues.

None yet

1 participant