Project

General

Profile

Actions

Bug #1562

closed

In SecTpmOsx, call CFRelease to free memory

Added by Anonymous over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Base
Target version:
Start date:
04/30/2014
Due date:
% Done:

100%

Estimated time:

Description

In sec-tpm-osx.cpp, there are several calls to create memory, for example:
CFStringRef keyLabel = CFStringCreateWithCString(NULL, keyNameUri.c_str(), kCFStringEncodingUTF8);

https://github.com/named-data/ndn-cxx/blob/f56c68f66b19444e82397db6f1c10604ecb1e6dd/src/security/sec-tpm-osx.cpp#L834

In cases like this, the code should also call CFRelease(keyLabel) to release the memory. There could be a memory leak without it. Functions also need to free the allocated memory returned by SecTpmOsx::Impl::getKey.


Related issues 1 (0 open1 closed)

Blocks ndn-cxx - Task #1663: Check if there are memory leaks in SecTpmOsxRejected

Actions
Actions

Also available in: Atom PDF