Skip to content

Commit

Permalink
Release mode and pixEnc.
Browse files Browse the repository at this point in the history
  • Loading branch information
octalmage committed May 10, 2016
1 parent 66611b7 commit 58f6c52
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/screengrab.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ MMBitmapRef copyMMBitmapFromDisplayInRect(MMRect rect)
else if(CFStringCompare(pixEnc, CFSTR(IO8BitIndexedPixels), kCFCompareCaseInsensitive) == kCFCompareEqualTo)
depth = 8;

CGDisplayModeRelease(mode);
CFRelease(pixEnc);

bitsPerPixel = (uint8_t) depth;
bytesPerPixel = bitsPerPixel / 8;
/* Align width to padding. */
Expand Down

0 comments on commit 58f6c52

Please sign in to comment.