浏览代码

Fixed potential dereference of NULL outErr argument in -startSavePointWithName:error: and -releaseSavePointWithName:error:.

Jim Correia 12 年之前
父节点
当前提交
c199a6de6f
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/FMDatabase.m

+ 3 - 3
src/FMDatabase.m

@@ -1007,8 +1007,8 @@ - (BOOL)startSavePointWithName:(NSString*)name error:(NSError**)outErr {
     NSParameterAssert(name);
     
     if (![self executeUpdate:[NSString stringWithFormat:@"savepoint '%@';", name]]) {
-        
-        if (*outErr) {
+
+        if (outErr) {
             *outErr = [self lastError];
         }
         
@@ -1024,7 +1024,7 @@ - (BOOL)releaseSavePointWithName:(NSString*)name error:(NSError**)outErr {
     
     BOOL worked = [self executeUpdate:[NSString stringWithFormat:@"release savepoint '%@';", name]];
     
-    if (!worked && *outErr) {
+    if (!worked && outErr) {
         *outErr = [self lastError];
     }