OLMAccount: Fix use of object after its memory was released

poljar/cmake_sas
manuroe 2018-06-26 07:52:23 +02:00 committed by Hubert Chathi
parent 20ee3858b9
commit 36fd68c818
1 changed files with 1 additions and 0 deletions

View File

@ -133,6 +133,7 @@
const char *error = olm_account_last_error(_account);
NSLog(@"error getting id keys: %s", error);
free(otkBytes);
return nil;
}
NSData *otk = [NSData dataWithBytesNoCopy:otkBytes length:otkLength freeWhenDone:YES];
NSError *error = nil;