Permalink
Browse files

Fix CFDataRef memory leak in cfstr_to_str()

Memory is created with a "Create" method, so the
function owns it and needs to release it.
  • Loading branch information...
ferrous26 committed Dec 29, 2012
1 parent bd1a5e8 commit 4ae1f1130c4b835d0d9261ca9a26f5662b008b8a
Showing with 1 addition and 0 deletions.
  1. +1 −0 ext/xcodeproj/xcodeproj_ext.c
@@ -32,6 +32,7 @@ cfstr_to_str(const void *cfstr) {
rb_funcall(str, forceEncodingId, 1, rb_str_new("UTF-8", 5));
}
+ CFRelease(data);
return str;
}

0 comments on commit 4ae1f11

Please sign in to comment.