2
0

NULL out free'ed references.

This commit is contained in:
Maarten Billemont
2017-08-23 00:01:23 -04:00
parent 0a42579d9e
commit a8949ca07e
12 changed files with 171 additions and 172 deletions

View File

@@ -580,7 +580,7 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
importMasterPassword = askImportPassword( @(info->fullName) );
if (!importMasterPassword) {
inf( @"Import cancelled." );
mpw_marshal_info_free( info );
mpw_marshal_info_free( &info );
return MPError( ([NSError errorWithDomain:NSCocoaErrorDomain code:NSUserCancelledError userInfo:nil]), @"" );
}
@@ -591,7 +591,7 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
// Parse import data.
MPMarshallError importError = { .type = MPMarshallSuccess };
MPMarshalledUser *importUser = mpw_marshall_read( importData.UTF8String, info->format, importMasterPassword.UTF8String, &importError );
mpw_marshal_info_free( info );
mpw_marshal_info_free( &info );
@try {
if (!importUser || importError.type != MPMarshallSuccess)
@@ -677,7 +677,7 @@ PearlAssociatedObjectProperty( NSNumber*, StoreCorrupted, storeCorrupted );
return nil;
}
@finally {
mpw_marshal_free( importUser );
mpw_marshal_free( &importUser );
}
}

View File

@@ -248,7 +248,7 @@
[self importSites:importData];
[UIPasteboard generalPasteboard].string = @"";
} cancelTitle:@"No" otherTitles:@"Import Sites", nil];
mpw_marshal_info_free( importInfo );
mpw_marshal_info_free( &importInfo );
} );
[super applicationDidBecomeActive:application];