Skip to content

Commit

Permalink
release the CGImageRef object ibireme#126
Browse files Browse the repository at this point in the history
  • Loading branch information
cddjr committed Jan 4, 2019
1 parent dc3905b commit 51ea68d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion YYImage/YYImageCoder.m
Original file line number Diff line number Diff line change
Expand Up @@ -2584,8 +2584,8 @@ - (NSData *)_encodeAPNG {
CFRelease(context);
if (!extendedImage) return nil;
CFDataRef frameData = YYCGImageCreateEncodedData(extendedImage, YYImageTypePNG, 1);
CFRelease(extendedImage);
if (!frameData) {
CFRelease(extendedImage);
return nil;
}
pngDatas[0] = (__bridge id)(frameData);
Expand Down

0 comments on commit 51ea68d

Please sign in to comment.