OLMAccount: Fix use of object after its memory was released

This commit is contained in:
manuroe 2018-06-26 07:52:23 +02:00 committed by Hubert Chathi
parent 20ee3858b9
commit 36fd68c818

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;