Permalink
Browse files

Merge pull request #7 from JrCs/patch-1

Fixed memory leak in GeneratePreviewForURL function.
  • Loading branch information...
2 parents 4f7e600 + d19f3d5 commit 11e7aba9143b392684a3100d9ba35a3de3d81130 @planbnet planbnet committed Mar 10, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 GeneratePreviewForURL.c
View
@@ -11,7 +11,9 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
CFDataRef data = createHTMLPreview( url );
if (!data || QLPreviewRequestIsCancelled(preview)) {
- return noErr;
+ if (data)
+ CFRelease(data);
+ return noErr;
}
CFStringRef keys[1];

0 comments on commit 11e7aba

Please sign in to comment.