Skip to content

Commit

Permalink
Making deallocation code in “-match_bitapOfText:andPattern:near:” mor…
Browse files Browse the repository at this point in the history
…e readable.
  • Loading branch information
JanX2 committed Jun 24, 2012
1 parent 49be0a9 commit 47c2879
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions DiffMatchPatch.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 47c2879

Please sign in to comment.