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