Fix memory leak in chrome.platformKeys
SECItem is used a lot for performing NSS operations and it was documented that to free a SECItem structure, SECItem_FreeItem should be used. SECItem was usedin platform keys for NSS operation without SECItem_FreeItem. For more information, please refer to: https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/SSL_functions/ssltyp.html#1030620 This CL utilizes crypto::ScopedSECItem instead of SECItem. Memory Leaks: CheckSystemTokenAvailability/EnterprisePlatformKeysTest.Basic/0 Before this change: 10 After this change: 6 CheckSystemTokenAvailability/EnterprisePlatformKeysTest.Basic/1 Before this change: 8 After this change: 6 CheckSystemTokenAvailability/EnterprisePlatformKeysTest.Basic/2 Before this change: 8 After this hange: 6 CheckSystemTokenAvailability/EnterprisePlatformKeysTest.Basic/3 Before this change: 5 After this change: 3 Bug: chromium:1054911 Test: Manual and browser_tests --gtest_filter=*EnterprisePlatformKeysTest* Change-Id: Ife95c0f84185d0bde9e9c564ba04c30da8aecab3 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2071017Reviewed-by:David Benjamin <davidben@chromium.org> Reviewed-by:
Maksim Ivanov <emaxx@chromium.org> Commit-Queue: Omar Morsi <omorsi@google.com> Cr-Commit-Position: refs/heads/master@{#744285}
Showing
Please register or sign in to comment