Permalink
Browse files

Merge pull request #5 from kapoto/patch-1

Fix possible memory leak if sysctl fails
  • Loading branch information...
2 parents b601a43 + 969c33f commit febfc1dc987d71b3b4a24296f1f981eb6affa3a3 @gekitz gekitz committed Dec 10, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 Classes/UIDevice+IdentifierAddition.m
@@ -61,6 +61,7 @@ - (NSString *) macaddress{
if (sysctl(mib, 6, buf, &len, NULL, 0) < 0) {
printf("Error: sysctl, take 2");
+ free(buf);
return NULL;
}

0 comments on commit febfc1d

Please sign in to comment.