Authored by DreamPiggy
Committed by lizhuoli

Fix CFRelease on NULL if CGImageSourceRef create failed

Fix CFRelease on NULL if CGImageSourceRef create failed, this may happen on progressive download with wrong image data
... ... @@ -376,8 +376,10 @@ didReceiveResponse:(NSURLResponse *)response
}
}
if (imageSource) {
CFRelease(imageSource);
}
}
for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) {
progressBlock(self.imageData.length, self.expectedSize, self.request.URL);
... ...