diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2012-09-21 21:20:50 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2012-09-21 21:20:50 +0200 |
commit | 8f4e57c344198b1beefcd17e913a6ac2114a8b00 (patch) | |
tree | 251ec2f719216ef070c7838719034ff2b6b65f4a /dw/hyphenator.cc | |
parent | 83d0c72cbb99424c9f1e4a44c1449380bda845ea (diff) |
fix some free() / delete mismatches
Diffstat (limited to 'dw/hyphenator.cc')
-rw-r--r-- | dw/hyphenator.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dw/hyphenator.cc b/dw/hyphenator.cc index efcac511..62a47a73 100644 --- a/dw/hyphenator.cc +++ b/dw/hyphenator.cc @@ -241,7 +241,7 @@ int *Hyphenator::hyphenateWord(const char *word, int *numBreaks) if (wordLc[startActualWord] == 0) { // No letters etc in word: do not hyphenate at all. - delete wordLc; + free (wordLc); *numBreaks = 0; return NULL; } @@ -263,14 +263,14 @@ int *Hyphenator::hyphenateWord(const char *word, int *numBreaks) int *result = new int[exceptionalBreaks->size()]; for (int i = 0; i < exceptionalBreaks->size(); i++) result[i] = exceptionalBreaks->get(i)->getValue() + startActualWord; - delete wordLc; + free (wordLc); *numBreaks = exceptionalBreaks->size(); return result; } // trie == NULL means that there is no pattern file. if (trie == NULL) { - delete wordLc; + free (wordLc); *numBreaks = 0; return NULL; } @@ -320,7 +320,7 @@ int *Hyphenator::hyphenateWord(const char *word, int *numBreaks) } } - delete wordLc; + free (wordLc); *numBreaks = breakPos.size (); if (*numBreaks == 0) |