Fixed memory leak
This commit is contained in:
parent
a740591380
commit
9f24d01e43
1 changed files with 2 additions and 2 deletions
|
@ -102,8 +102,8 @@ int Settings::getDeviceId(int intDeviceIndex) const {
|
|||
CFStringGetCString( cfid, cp, size, kCFStringEncodingUTF8 );
|
||||
cp = (char *)realloc( cp, strlen(cp) + 1);
|
||||
id = atoi(cp);
|
||||
|
||||
|
||||
free(cp);
|
||||
|
||||
CFRelease(key);
|
||||
CFRelease(split);
|
||||
CFRelease(cfid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue