diff --git a/Source/NSData.m b/Source/NSData.m index 4a4ee74f0..27c58fdb7 100644 --- a/Source/NSData.m +++ b/Source/NSData.m @@ -2746,7 +2746,8 @@ getBytes(void* dst, void* src, unsigned len, unsigned limit, unsigned *pos) maxLength: sizeof(thePath)-1] == NO) { NSWarnMLog(@"Open (%s) attempt failed - bad path", thePath); - return NO; + RELEASE(self); + return nil; } fd = open(thePath, O_RDONLY); if (fd < 0)