Skip to content

Conversation

@kocsismate
Copy link
Collaborator

No description provided.

@kocsismate kocsismate requested a review from DomBlack August 18, 2022 08:33
efree(buf);
hex[keyLength*2] = '\0';
RETURN_STRINGL(hex, keyLength * 2);
RETVAL_STRINGL(hex, keyLength * 2);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remicollet I'd appreciate your review as well :)

Copy link
Contributor

@remicollet remicollet Aug 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

BTW, double allocation could be avoid, using something like https://github.com/php/php-src/blob/master/ext/hash/hash.c#L411 (PHP 7+ only)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the suggestion! BTW: I've already increased the minimum version requirement to PHP 7.0 yesterday :)

@kocsismate kocsismate merged commit fe6c4d8 into DomBlack:master Aug 18, 2022
@kocsismate kocsismate deleted the fix-memory-leak branch August 18, 2022 08:56
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.

2 participants