Kouhei Sutou 2019-01-28 17:58:38 +0900 (Mon, 28 Jan 2019) Revision: 96cdfbbded203df4e29f434aaffd128aadfa2b93 https://github.com/groonga/groonga/commit/96cdfbbded203df4e29f434aaffd128aadfa2b93 Message: Fix a bug that unavailable pointer is used It's occurred only when DB is failed to create. Modified files: lib/db.c Modified: lib/db.c (+3 -1) =================================================================== --- lib/db.c 2019-01-28 17:56:36 +0900 (ad4aec22b) +++ lib/db.c 2019-01-28 17:58:38 +0900 (ca1876944) @@ -294,9 +294,11 @@ exit: } if (s->specs) { const char *specs_path; + char specs_path_copy[PATH_MAX]; specs_path = grn_obj_path(ctx, (grn_obj *)(s->specs)); + grn_strcpy(specs_path_copy, sizeof(specs_path_copy), specs_path); grn_ja_close(ctx, s->specs); - grn_ja_remove(ctx, specs_path); + grn_ja_remove(ctx, specs_path_copy); } if (s->config) { grn_hash_close(ctx, s->config); -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190128/f3ab3004/attachment-0001.html>