Changeset 39103 in vbox
- Timestamp:
- Oct 25, 2011 6:25:32 AM (13 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Devices/Audio/coreaudio.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Audio/coreaudio.c
r33540 r39103 378 378 pszTmp = CFStringGetCStringPtr(pCFString, kCFStringEncodingUTF8); 379 379 if (pszTmp) 380 { 380 381 /* On success make a copy */ 381 382 pszResult = RTStrDup(pszTmp); 383 } 382 384 else 383 385 { 384 386 /* If the pointer isn't available directly, we have to make a copy. */ 385 387 cLen = CFStringGetLength(pCFString) + 1; 386 pszResult = RTMemAlloc (cLen * sizeof(char));388 pszResult = RTMemAllocZTag(cLen * sizeof(char), RTSTR_TAG); 387 389 if (!CFStringGetCString(pCFString, pszResult, cLen, kCFStringEncodingUTF8)) 388 390 { 389 RT MemFree(pszResult);391 RTStrFree(pszResult); 390 392 pszResult = NULL; 391 393 } … … 641 643 UInt32 uFlag = 0; /* for setting flags */ 642 644 CFStringRef name; /* for the temporary device name fetching */ 643 char *pszName ;644 char *pszUID ;645 char *pszName = NULL; 646 char *pszUID = NULL; 645 647 ComponentDescription cd; /* description for an audio component */ 646 648 Component cp; /* an audio component */ … … 1464 1466 UInt32 uFlag = 0; /* for setting flags */ 1465 1467 CFStringRef name; /* for the temporary device name fetching */ 1466 char *pszName ;1467 char *pszUID ;1468 char *pszName = NULL; 1469 char *pszUID = NULL; 1468 1470 ComponentDescription cd; /* description for an audio component */ 1469 1471 Component cp; /* an audio component */ … … 1516 1518 if (pszName && pszUID) 1517 1519 LogRel(("CoreAudio: Using input device: %s (UID: %s)\n", pszName, pszUID)); 1518 RTStrFree(pszUID); 1520 if (pszUID) 1521 RTStrFree(pszUID); 1519 1522 } 1520 RTStrFree(pszName); 1523 if (pszName) 1524 RTStrFree(pszName); 1521 1525 } 1522 1526 else
Note:
See TracChangeset
for help on using the changeset viewer.

