aboutsummaryrefslogtreecommitdiff
path: root/xcode
diff options
context:
space:
mode:
authormanuroe <manu@matrix.org>2018-06-26 07:52:23 +0200
committerHubert Chathi <hubert@uhoreg.ca>2018-06-27 12:26:44 -0400
commit36fd68c818c72e8cd802dd524e9464577d3be7cf (patch)
tree61f55b2035ebb7694faa4d39140540b77956dc60 /xcode
parent20ee3858b9fbed989c0ab8d4f721451c21413c08 (diff)
OLMAccount: Fix use of object after its memory was released
Diffstat (limited to 'xcode')
-rw-r--r--xcode/OLMKit/OLMAccount.m1
1 files changed, 1 insertions, 0 deletions
diff --git a/xcode/OLMKit/OLMAccount.m b/xcode/OLMKit/OLMAccount.m
index af1e308..058b389 100644
--- a/xcode/OLMKit/OLMAccount.m
+++ b/xcode/OLMKit/OLMAccount.m
@@ -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;