Skip to content

Commit

Permalink
Merge pull request #11 from tgt/patch-1
Browse files Browse the repository at this point in the history
Fix leak caused by failing to free Expat parser.
  • Loading branch information
rjray committed Sep 28, 2015
2 parents 3270580 + d567128 commit 0dcdf12
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/RPC/XML/Client.pm
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,16 @@ sub send_request ## no critic (ProhibitExcessComplexity)
$response = $self->useragent->request($reqclone, $cb);
if ($message = $response->headers->header('X-Died'))
{
$parser->release();

# One of the die's was triggered
return ('CODE' eq ref $self->error_handler) ?
$self->error_handler->($message) : $message;
}
if (! $response->is_success)
{
$parser->release();

$message = "$me: HTTP server error: " . $response->message;
return ('CODE' eq ref $self->error_handler) ?
$self->error_handler->($message) : $message;
Expand Down

0 comments on commit 0dcdf12

Please sign in to comment.