mac-capture: Don't call CFRelease on null vars
CFRelease is not meant to be used with null variables. Check the variables before calling CFRelease.
This commit is contained in:
@@ -62,8 +62,10 @@ static bool coreaudio_enum_device(enum_device_proc_t proc, void *param,
|
||||
enum_next = proc(param, cf_name, cf_uid, id);
|
||||
|
||||
fail:
|
||||
CFRelease(cf_name);
|
||||
CFRelease(cf_uid);
|
||||
if (cf_name)
|
||||
CFRelease(cf_name);
|
||||
if (cf_uid)
|
||||
CFRelease(cf_uid);
|
||||
return enum_next;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user