X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;ds=sidebyside;f=src%2Fstemmer.c;h=5b8097fd858aa022bf499c56ad06a05e84bcb744;hb=0f073baf2183a54f2a5691e697fde68c9a5f50c5;hp=12c91195d660084a5d379f82469eca7e02b7ee58;hpb=640ef4d07f0b09f70578dccc4cda6d282ed6b281;p=yaz-moved-to-github.git diff --git a/src/stemmer.c b/src/stemmer.c index 12c9119..5b8097f 100644 --- a/src/stemmer.c +++ b/src/stemmer.c @@ -47,7 +47,7 @@ yaz_stemmer_p yaz_stemmer_snowball_create(const char *locale, const char *rule, yaz_stemmer_p yaz_stemmer; yaz_log(YLOG_DEBUG, "create snowball stemmer: algoritm %s charenc %s ", algorithm, charenc); if (stemmer == 0) { - *status = U_ARGUMENT_TYPE_MISMATCH; + *status = U_ILLEGAL_ARGUMENT_ERROR; yaz_log(YLOG_DEBUG, "failed to create stemmer. Creating NOP stemmer"); return 0; @@ -90,6 +90,7 @@ void yaz_stemmer_stem(yaz_stemmer_p stemmer, struct icu_buf_utf16 *dst, struct i icu_utf16_from_utf8_cstr(dst, cstr , status); } } + icu_buf_utf8_destroy(utf8_buf); return ; break; }