Skip to content

Commit

Permalink
Fix crash when trying to release NULL value
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxoos authored and mikehardy committed Dec 17, 2020
1 parent c3b4cb0 commit 2b4e65f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/storage/ios/RNFBStorage/RNFBStorageCommon.m
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ + (NSString *)mimeTypeForPath:(NSString *)localFilePath {
(__bridge CFStringRef) [localFilePath pathExtension],
NULL);
CFStringRef mimeType = UTTypeCopyPreferredTagWithClass(UTI, kUTTagClassMIMEType);
CFRelease(UTI);
if (UTI) { CFRelease(UTI); }

if (!mimeType) {
return @"application/octet-stream";
Expand Down

0 comments on commit 2b4e65f

Please sign in to comment.