Fix an issue where the skipped character set points to bad memory.
This commit is contained in:
parent
c77a001e73
commit
02c849bdc8
@ -29,7 +29,7 @@ NSSet * AFContentTypesFromHTTPHeader(NSString *string) {
|
||||
static NSCharacterSet *_skippedCharacterSet = nil;
|
||||
static dispatch_once_t onceToken;
|
||||
dispatch_once(&onceToken, ^{
|
||||
_skippedCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@" ,"];
|
||||
_skippedCharacterSet = [[NSCharacterSet characterSetWithCharactersInString:@" ,"] retain];
|
||||
});
|
||||
|
||||
if (!string) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user