diff --git a/fuzzysearch/_substitutions_only_lp_template.h b/fuzzysearch/_substitutions_only_lp_template.h index 382394f..1821665 100644 --- a/fuzzysearch/_substitutions_only_lp_template.h +++ b/fuzzysearch/_substitutions_only_lp_template.h @@ -35,6 +35,7 @@ FUNCTION_NAME(PyObject *self, PyObject *args) PREPARE; if (seq_len < subseq_len) { + DO_FREES; RETURN_AT_END; } diff --git a/fuzzysearch/_substitutions_only_ngrams_template.h b/fuzzysearch/_substitutions_only_ngrams_template.h index 5e47e00..5ca4d4d 100644 --- a/fuzzysearch/_substitutions_only_ngrams_template.h +++ b/fuzzysearch/_substitutions_only_ngrams_template.h @@ -54,6 +54,7 @@ FUNCTION_NAME(PyObject *self, PyObject *args) PREPARE; if (seq_len < subseq_len) { + DO_FREES; RETURN_AT_END; }