Skip to content

Commit

Permalink
Merge pull request #789 from ccgus/robertmryan/mrc-garbage-value
Browse files Browse the repository at this point in the history
Uninitialized object in manual reference counting
  • Loading branch information
ccgus committed May 8, 2020
2 parents abbaa01 + 713da2d commit 2417aa4
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/fmdb/FMDatabaseQueue.m
Original file line number Diff line number Diff line change
Expand Up @@ -301,17 +301,13 @@ - (BOOL)checkpoint:(FMDBCheckpointMode)mode name:(NSString *)name error:(NSError
- (BOOL)checkpoint:(FMDBCheckpointMode)mode name:(NSString *)name logFrameCount:(int * _Nullable)logFrameCount checkpointCount:(int * _Nullable)checkpointCount error:(NSError * __autoreleasing _Nullable * _Nullable)error
{
__block BOOL result;
__block NSError *blockError;


FMDBRetain(self);
dispatch_sync(_queue, ^() {
result = [self.database checkpoint:mode name:name logFrameCount:logFrameCount checkpointCount:checkpointCount error:&blockError];
result = [self.database checkpoint:mode name:name logFrameCount:logFrameCount checkpointCount:checkpointCount error:error];
});
FMDBRelease(self);

if (error) {
*error = blockError;
}
return result;
}

Expand Down

0 comments on commit 2417aa4

Please sign in to comment.