Skip to content
Browse files

Making deallocation code in “-match_bitapOfText:andPattern:near:” mor…

…e readable.
  • Loading branch information...
1 parent 49be0a9 commit 47c287932b8e0f8fd18a32aee203cc602c952348 @JanX2 committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 DiffMatchPatch.m
View
8 DiffMatchPatch.m
@@ -1999,12 +1999,12 @@ - (NSUInteger)match_bitapOfText:(NSString *)text
}
- if (rd != NULL && last_rd != rd) {
- free(rd);
- }
- if (last_rd != NULL) {
+ if (last_rd != NULL && last_rd != rd) {
free(last_rd);
}
+ if (rd != NULL) {
+ free(rd);
+ }
return best_loc;
}

0 comments on commit 47c2879

Please sign in to comment.
Something went wrong with that request. Please try again.