Skip to content

Commit

Permalink
Return early if kvPairs is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
AZero13 committed Sep 14, 2024
1 parent 7e1a313 commit 9c7b779
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/usb-darwin.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,6 +1894,8 @@ static CFStringRef copy_value_for_key(CFStringRef deviceID,
return NULL;

kvPairs = CFStringCreateArrayBySeparatingStrings(kCFAllocatorDefault, deviceID, CFSTR(";"));
if (!kvPairs)
return NULL;
max = CFArrayGetCount(kvPairs);

for (CFIndex idx = 0; idx < max; idx++)
Expand Down

0 comments on commit 9c7b779

Please sign in to comment.