Skip to content

Commit 7444179

Browse files
author
Edward Smith
committed
Fixed a small memory leak.
1 parent f1b712e commit 7444179

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Branch-SDK/Branch-SDK/BNCStrongMatchHelper.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,10 @@ - (BOOL) willLoadViewControllerWithURL:(NSURL*)matchURL {
231231
fail |= ![self subclass:BNCMatchViewControllerSubclass selector:@selector(becomeFirstResponder)];
232232
fail |= ![self subclass:BNCMatchViewControllerSubclass selector:@selector(canBecomeFirstResponder)];
233233
fail |= ![self subclass:BNCMatchViewControllerSubclass selector:@selector(nextResponder)];
234-
if (fail) return NO;
235-
234+
if (fail) {
235+
objc_disposeClassPair(BNCMatchViewControllerSubclass);
236+
return NO;
237+
}
236238
objc_registerClassPair(BNCMatchViewControllerSubclass);
237239
}
238240

0 commit comments

Comments
 (0)