Kouhei Sutou
null+****@clear*****
Sun Apr 17 23:59:26 JST 2016
Kouhei Sutou 2016-04-17 23:59:26 +0900 (Sun, 17 Apr 2016) New Revision: 1d8fcd86ef78ce1305b0f3effe6f8bb7cfc77567 https://github.com/groonga/groonga/commit/1d8fcd86ef78ce1305b0f3effe6f8bb7cfc77567 Message: tokenizer mecab: fix a memory leak on dictionary encoding mismatch error [groonga-dev,04012] Reported by Naoya Murakami. Thanks!!! Modified files: plugins/tokenizers/mecab.c Modified: plugins/tokenizers/mecab.c (+7 -1) =================================================================== --- plugins/tokenizers/mecab.c 2016-04-15 18:47:37 +0900 (1d153a4) +++ plugins/tokenizers/mecab.c 2016-04-17 23:59:26 +0900 (dfefb92) @@ -1,5 +1,6 @@ /* -*- c-basic-offset: 2 -*- */ -/* Copyright(C) 2009-2015 Brazil +/* + Copyright(C) 2009-2016 Brazil This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public @@ -599,6 +600,11 @@ GRN_PLUGIN_INIT(grn_ctx *ctx) } check_mecab_dictionary_encoding(ctx); + if (ctx->rc != GRN_SUCCESS) { + grn_plugin_mutex_close(ctx, sole_mecab_mutex); + sole_mecab_mutex = NULL; + } + return ctx->rc; } -------------- next part -------------- HTML����������������������������...다운로드