Skip to content
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...
1 parent bd1a5e8 commit 4ae1f1130c4b835d0d9261ca9a26f5662b008b8a @ferrous26 ferrous26 committed
Showing with 1 addition and 0 deletions.
  1. +1 −0 ext/xcodeproj/xcodeproj_ext.c
View
1 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.
Something went wrong with that request. Please try again.